[JAVA-3212] Inconsistent output between java driver and mongo shell Created: 22/Feb/19 Updated: 27/Oct/23 Resolved: 25/Feb/19 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | BSON |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Varun Agrawal | Assignee: | Jeffrey Yemin |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Mongo Shell version: 4.x
I have noticed this code is causing conflicts with binData from mongoshell.
To test the issue, just create a simple document {"A": "bin2" : BinData(2, "aGVsbG8="),}//hello Java driver fails to process it. |
| Comments |
| Comment by Danny Hatcher (Inactive) [ 25/Feb/19 ] |
|
I created |
| Comment by Varun Agrawal [ 25/Feb/19 ] |
|
@Jeff Thank you. Please do let me know if you hear something from server team |
| Comment by Jeffrey Yemin [ 25/Feb/19 ] |
|
The driver is following the BSON specification, which states this about BSON binary subtype 2:
All drivers treat it as a decoding error if the data does not conform to that specification. See the drivers specification tests here. As a workaround, please avoid using BSON binary subtype 2. I will ask the server team follow up on this to see if this should be treated as a shell issue, or whether this is expected behavior.
|