You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Tom van Wietmarschen (JIRA)" <ji...@apache.org> on 2017/07/20 14:53:00 UTC

[jira] [Updated] (OLINGO-1152) OLingo client crashes when encountering a null value for an enum property

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

Tom van Wietmarschen updated OLINGO-1152:
-----------------------------------------
    Attachment: 0001-OLINGO-1152-Fix-IllegalArgumentException-when-enum-p.patch

Patch to add null-check for enum values

> 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
>         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
(v6.4.14#64029)