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

BasicBSONObject.equals method broken for BasicDBList of BasicDBObject

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.12.2, 3.0.0
    • 2.12.0
    • API
    • None
    • Major Change

    Description

      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.

      Attachments

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            niklasn Niklas Nebel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: