Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3749

JsonReader#visitUUIDConstructor has a condition that always true

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

      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:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            justin.chu@datastax.com Justin Chu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: