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

toJson() method in ByteBufBsonDocument throws exception if called more than once

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.8
    • Affects Version/s: 3.1.0
    • Component/s: BSON
    • None

      toString() (toJson()) method in ByteBufBsonDocument object breaks this object, therefore it is impossible to use more than one CommandListener. If event.getCommand().toJson() in second listener is called than an "org.bson.BsonSerializationException: While decoding a BSON document 4 bytes were required, but only 0 remain" will be occured.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            musanton Anton Musikhin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: