Numbers returned from 2.4.5 database are Doubles that were Integers in 2.4.4

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.4.5
    • Component/s: None
    • None
    • Environment:
      unknown linux
    • Major Change
    • ALL
      • save a document with a field value of 1 (the number, not the string) to each database (2.4.4 & 2.4.5)
      • retrieve that using the Java driver 2.11.2 and call .toString() on that field value without any casting or assigning.
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Using java driver 2.11.2 to connect to two different mongo instances with the same data in them (written by our client app w/ 2.11.2) and retrieve a document, the following returns different values:

      dbObject.get("someNumber").toString()

      2.4.4:
      "1"

      2.4.5:
      "1.0"

      Nothing else was upgraded or changed, but this is obviously a breaking change to the behavior or some client applications.

      I could not find any indication that this would happen in the 2.4 documentation.

            Assignee:
            Unassigned
            Reporter:
            Jay Cliffe
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: