Determine handling of null values when decoding back in to primitive types

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 3.5.0
    • Affects Version/s: None
    • Component/s: Codecs
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Rescoping to provide meaningful error messages when data is found for a field that does not match the expected type.

      Rather than throwing a generic error:

      org.bson.BsonInvalidOperationException: readBoolean can only be called when CurrentBSONType is BOOLEAN, not when CurrentBSONType is NULL.

      Wrap the exception and also provide information on what the name of the field that failed.

      Was:
      Determine handling of null values when decoding back in to primitive types

      When decoding in to Java objects with primitives, we need to decide if we're going to actively set those primitives to their 0 values or not set the field at all let any initialization in the class take care of it.

            Assignee:
            Ross Lawley
            Reporter:
            Justin Lee
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: