Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-10805

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

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.5
    • Component/s: None
    • Labels:
      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.

      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 Unassigned
            Reporter:
            jcliffe Jay Cliffe
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: