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

Ensure that an exception is thrown if a BSON string is not valid UTF-8

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • None

      Currently the driver calls java.lang.String#String(byte[], int, int, java.lang.String) to decode UTF-8 byte arrays, but this method silently replaces invalid UTF-8 byte sequences with a replacement character.

      The driver should instead use CharsetDecoder directly so that an exception can be thrown instead.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: