[ 
https://issues.apache.org/jira/browse/OLINGO-1152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16585802#comment-16585802
 ] 

Rajesh Vansing Patil edited comment on OLINGO-1152 at 8/20/18 12:31 PM:
------------------------------------------------------------------------

Hi Christian

its not working with  the given patch. If Server gives me Output with some enum 
value is null like Density then for get operation if  we query all attribute 
with with density in select field then it throw the null exception on the  
response.getBody() line.  actually it should omit the density(ENUM) which has 
null value. working fine with other data types.

We also tried the new Library 4.5 but Internally some method might be change so 
we got No such method error exception at run time( not compile time) .So we 
just applied the patch for odata-client-core-4.4.0.jar  

Please reopen this issue.

 

Thanks 

Rajesh 

 


was (Author: rajeshvpatil):
Hi Christian

its not working with  the given patch. If Server gives me Output with some enum 
value is null like Density then for get operation if  we query all attribute 
with with density in select field then it throw the null exception  in 
request.getBody()  actually it should omit the density(ENUM) which has null 
value. working fine with other data types.

We also tried the new Library 4.5 but Internally some method might be change so 
we got No such method error exception at run time( not compile time) .So we 
just applied the patch for odata-client-core-4.4.0.jar  

Please reopen this issue.

 

Thanks 

Rajesh 

 

> 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
>            Priority: Major
>             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
(v7.6.3#76005)

Reply via email to