[JAVA-1900] Can encode but not decode Binary UUID's with invalid lengths Created: 22/Jul/15 Updated: 19/Oct/16 Resolved: 29/Sep/16 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | BSON |
| Affects Version/s: | 3.0.0, 2.13.2 |
| Fix Version/s: | 3.4.0-rc1, 3.4.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Ross Lawley | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Currently can't round trip
|
| Comments |
| Comment by Githook User [ 29/Sep/16 ] |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Fix decoding BSON binary UUID values in Iterables.
|
| Comment by Ross Lawley [ 29/Sep/16 ] |
| Comment by Githook User [ 22/Sep/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: BSON binary representations of UUID should be 16 bytes, but the server doesn't enforce that constraint. Rather than throw an exception when decoding a This way, clients expecting a UUID instance will still fail if casting to UUID, but at least they have the ability to control this behavior by doing type tests. |
| Comment by Jeffrey Yemin [ 20/Sep/16 ] |
|
See also LazyBSONObject, which has a different code path to creating a UUID (and doesn't handle subtype 4) |