[JAVA-2961] Get ObjectId from bytes not throwing exception if bytes.length > 12 Created: 05/Sep/18 Updated: 28/Oct/23 Resolved: 08/Jan/19 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | BSON |
| Affects Version/s: | None |
| Fix Version/s: | 3.10.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Umang Jalan | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Comments |
| Comment by Githook User [ 14/Jan/19 ] |
|
Author: {'username': 'jyemin', 'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin'}Message: Conform to ObjectId(byte[] bytes) contract The Javadoc states that it throws IllegalArgumentException if array is
|
| Comment by Githook User [ 08/Jan/19 ] |
|
Author: {'username': 'jyemin', 'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin'}Message: Conform to ObjectId(byte[] bytes) contract The Javadoc states that it throws IllegalArgumentException if array is
|
| Comment by Umang Jalan [ 05/Sep/18 ] |
|
jeff.yemin I think its already broken and it needs to be fixed. Everyone refers to java doc before integration to get the expected output. So I am assuming whoever is using it is actually is getting wrong output than expected as was in my case. Whenever this change was made , it was not communicated in change log either about the new behaviour. So if someone is relying on current behavior , I believe thats the wrong expectation and its need to be notified. |
| Comment by Jeffrey Yemin [ 05/Sep/18 ] |
|
I'm not convinced that this change should be made. Although it would make the implementation match the Javadoc description of the bytes parameter, it would break existing applications relying on the current behavior, which is consistent with the behavior and documentation of the constructor that takes a ByteBuffer. umang can you present a counter-argument? |
| Comment by Umang Jalan [ 05/Sep/18 ] |