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

bad bson decode/encode

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6
    • Component/s: API
    • Environment:
      linux ubuntu 10+

      bad decoding of bson long numbers.
      this bug happens on our remote ubuntu servers. i wasn't able to reproduce this on my desktop ubuntu in eclipse debugging mode.
      is this related to some dependencies?machine 32/64bit configuration??
      this doesn't happen with 2.5 and older.

      byte[] bsonobj1 = BSON.encode(new BasicDBObject("test", -6155364211098656392l));
      DBObject longdecode = (DBObject) JSON.parse(BSON.decode(bsonobj1).toString());
      System.out.println(longdecode);

      { "test" : -833625736}

            Assignee:
            Unassigned Unassigned
            Reporter:
            sirpy hadar
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: