[JAVA-3799] visitUUIDConstructor always return BsonBinarySubType.UUID_LEGACY Created: 25/Jul/20  Updated: 27/Jul/20  Resolved: 27/Jul/20

Status: Closed
Project: Java Driver
Component/s: JSON
Affects Version/s: 4.0.5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Loïc Hermann Assignee: Jeffrey Yemin
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates JAVA-3749 JsonReader#visitUUIDConstructor has a... Closed
Related
related to JAVA-3749 JsonReader#visitUUIDConstructor has a... Closed

 Description   

The condition in visitUUIDConstructor is always true and make it return a UUID_LEGACY regardless of the uuidConstructorName

 

{{ BsonBinarySubType subType = BsonBinarySubType.UUID_STANDARD;
if (!"UUID".equals(uuidConstructorName) || !"GUID".equals(uuidConstructorName)) {
subType = BsonBinarySubType.UUID_LEGACY;
}}}

{{}}

Fix: https://github.com/mongodb/mongo-java-driver/pull/556

 

This is not present in 4.1.x as Legacy support has been dropped.



 Comments   
Comment by Jeffrey Yemin [ 27/Jul/20 ]

Great, thanks. Please look for release announcements on https://developer.mongodb.com/community/forums/tags/c/community/release-notes/35/java

Comment by Loïc Hermann [ 27/Jul/20 ]

Yes it will be suffiscient for Quarkus, I already tried with the rc ! Ok I will wait the release and include it.

Thank's a lot.

Comment by Jeffrey Yemin [ 27/Jul/20 ]

Got it. So will an upgrade to 4.1.0 be sufficient? We intend to release it this week.

Comment by Loïc Hermann [ 27/Jul/20 ]

I was trying to fix https://github.com/quarkusio/quarkus/issues/10941

Comment by Loïc Hermann [ 27/Jul/20 ]

Hi, yes it's the same issue ! but it has not been fixed on 4.0.x branch (which is problematic because without this UUIDs cannot be fetched if encoded as STANDARD (0x04)).

 

Comment by Jeffrey Yemin [ 27/Jul/20 ]

Added link to JAVA-3749

Generated at Thu Feb 08 09:00:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.