Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1152

OLingo client crashes when encountering a null value for an enum property

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • (Java) V4 4.3.0
    • (Java) V4 4.5.0
    • odata4-client
    • None

    Description

      An IllegalArgumentException is thrown when the OLingo client encounters a enum property that has a null value. It turns out the Property's value is set to "null" (a String) instead of null. Tracing back the source of the null-String shows org.apache.olingo.client.core.serialization.JsonDeserializer always assumes Enum values are Strings. (It calls node.asText() even on a NullNode), adding a isNull() check solves the issue. Patch to follow.

      Attachments

        1. 0001-OLINGO-1152-Test-case.patch
          3 kB
          Tom van Wietmarschen
        2. 0001-OLINGO-1152-Fix-IllegalArgumentException-when-enum-p.patch
          1 kB
          Tom van Wietmarschen

        Activity

          People

            chrisam Christian Amend
            Aaargh! Tom van Wietmarschen
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: