[JAVA-1629] DBCursor getters should not return copies for mutable objects Created: 22/Jan/15 Updated: 31/Mar/15 Resolved: 23/Jan/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Query Operations |
| Affects Version/s: | None |
| Fix Version/s: | 3.0.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The 3.0.x branch implementation of DBCursor.getQuery and DBCursor.getKeysWanted return a copy of the internal property, whereas before they returned a reference to the internal copy. This break clients who do:
since because getQuery returns a copy, the put has no effect on the query that's actually performed. This should be reverted to the previous behavior. |
| Comments |
| Comment by Jeffrey Yemin [ 31/Mar/15 ] |
|
Closing all resolved 3.0.0 issues, as 3.0.0 has been tagged and released. |
| Comment by Githook User [ 30/Jan/15 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: Changed DBCursor behavior such that any method that returns a DBObject property of the query returns the internal reference instead of a copy of it, Thanks to the MongoJack tests for alerting us to this behavior change. |
| Comment by Githook User [ 23/Jan/15 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: Changed DBCursor behavior such that any method that returns a DBObject property of the query returns the internal reference instead of a copy of it, Thanks to the MongoJack tests for alerting us to this behavior change. |