BasicBSONObject.equals method broken for BasicDBList of BasicDBObject

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.12.2, 3.0.0
    • Affects Version/s: 2.12.0
    • Component/s: API
    • None
    • None
    • Major Change
    • None
    • None
    • None
    • None
    • None
    • None

      The changed "equals" in 2.12.0 (fix for JAVA-416) calls canonicalize for nested objects, but not for objects in lists.
      Example in Scala:

      val one = com.mongodb.util.JSON.parse("""{"list": [{"x":1, "y":2}]}""")
      val two = com.mongodb.util.JSON.parse("""{"list": [{"y":2, "x":1}]}""")
      one == two
      

      Result is false in 2.12.0, true in 2.11.4.

            Assignee:
            Jeffrey Yemin
            Reporter:
            Niklas Nebel
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: