JsonReader#visitUUIDConstructor has a condition that always true

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 4.1.0
    • Affects Version/s: 4.0.3
    • Component/s: JSON
    • None
    • Environment:
      Linux, Java
    • None
    • Minor Change
    • None
    • None
    • None
    • None
    • None
    • None

      See https://github.com/mongodb/mongo-java-driver/blob/r4.0.3/bson/src/main/org/bson/json/JsonReader.java#L725

      The condition

      if (!"UUID".equals(uuidConstructorName) || !"GUID".equals(uuidConstructorName))
      

      would always be true, such that it would always create a BsonBinary with the subtype:

      BsonBinarySubType.UUID_LEGACY
      

      when parsing a UUID.

              Assignee:
              Jeffrey Yemin
              Reporter:
              Justin Chu
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: