Uploaded image for project: 'Spring Social Facebook'
  1. Spring Social Facebook
  2. SOCIALFB-189

Error deserializing null into primitives when using Jackson 2.6

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 2.0.1.RELEASE
    • Fix Version/s: 2.0.2.RELEASE
    • Component/s: API Binding
    • Labels:
      None

      Description

      Prior to Jackson 2.6 custom deserializers apparently weren't even used if the field to be deserialized was null...consequently, they would remain at the default value. An int, for example, would be left as 0.

      Starting with Jackson 2.6, the custom deserializer will be used even if the field is null, resulting in a NPE attempting to deserialize null into a non-nullable primitive.

      This can be fixed by overriding the getNullValue() method in any custom deserializers such as AchievementPointsDeserializer.

        Attachments

          Activity

            People

            Assignee:
            habuma Craig Walls
            Reporter:
            habuma Craig Walls
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: