olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Amend (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OLINGO-1152) OLingo client crashes when encountering a null value for an enum property
Date Fri, 08 Sep 2017 12:57:00 GMT

     [ https://issues.apache.org/jira/browse/OLINGO-1152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Christian Amend resolved OLINGO-1152.
       Resolution: Fixed
         Assignee: Christian Amend
    Fix Version/s: (Java) V4 4.5.0

Hi Tom,

I applied the changes to the master branch. Thanks for providing the tests and sorry for missing
them when I built the release.

Best Regards,

> OLingo client crashes when encountering a null value for an enum property
> -------------------------------------------------------------------------
>                 Key: OLINGO-1152
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1152
>             Project: Olingo
>          Issue Type: Improvement
>          Components: odata4-client
>    Affects Versions: (Java) V4 4.3.0
>            Reporter: Tom van Wietmarschen
>            Assignee: Christian Amend
>             Fix For: (Java) V4 4.5.0
>         Attachments: 0001-OLINGO-1152-Fix-IllegalArgumentException-when-enum-p.patch,
> 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. 

This message was sent by Atlassian JIRA

View raw message