You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Christian Amend (JIRA)" <ji...@apache.org> on 2017/09/08 12:57:00 UTC
[jira] [Resolved] (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 ]
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,
Christian
> 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, 0001-OLINGO-1152-Test-case.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)