[JAVA-1795] Collection update methods should throw if update document is empty Created: 04/May/15  Updated: 05/May/15  Resolved: 05/May/15

Status: Closed
Project: Java Driver
Component/s: Write Operations
Affects Version/s: 3.0.0
Fix Version/s: 3.0.1, 3.1.0

Type: Bug Priority: Minor - P4
Reporter: Jeffrey Yemin Assignee: Ross Lawley
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CSHARP-1265 Update variants allow sending empty d... Closed

 Description   

Collection update methods correctly validate that all keys in the update document start with the '$' character. However, they don't validate that the update document is not empty. This is incorrect because an empty update document is considered by the server to be a full document replacement.



 Comments   
Comment by Jeffrey Yemin [ 05/May/15 ]

Closed for 3.0.1 release.

Comment by Githook User [ 05/May/15 ]

Author:

{u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}

Message: Update operations should check for empty documents

JAVA-1795
Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/7b5f965ae1a8dcf614f4fe818b15bb9286a3b51f

Comment by Githook User [ 05/May/15 ]

Author:

{u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}

Message: Update operations should check for empty documents

JAVA-1795
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/0b5f1c2db138e182679ae25cf094f871c3a242e3

Generated at Thu Feb 08 08:55:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.