[
https://issues.apache.org/jira/browse/OLINGO-499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14239425#comment-14239425
]
Christian Holzer commented on OLINGO-499:
-----------------------------------------
I made a fix for this issue. As Michael reported in
https://issues.apache.org/jira/browse/OLINGO-501 the ODataJsonSerializer
passed the whole collection of complex properties to the method
writeComplexValue , instead a single complex value.
In addition the method “isComplex” returns true if and only if the type of the
property is complex. The other methods like isPrimitive have the same behavior.
Is this issue solved for you?
Best regards,
Christian
> AbstractValuable.isComplex
> --------------------------
>
> Key: OLINGO-499
> URL: https://issues.apache.org/jira/browse/OLINGO-499
> Project: Olingo
> Issue Type: Bug
> Components: odata4-commons, odata4-server
> Affects Versions: (Java) V4 4.0.0-beta-02
> Reporter: Ole Lilienthal
> Assignee: Michael Bolz
> Priority: Critical
> Labels: easyfix
> Attachments: Olingo499.diff
>
>
> org.apache.olingo.commons.core.data.AbstractValuable.isComplex() returns
> false for org.apache.olingo.commons.api.data.ValueType.COLLECTION_COMPLEX.
> It should rather be:
> return (valueType == ValueType.COMPLEX || valueType.getBaseType() ==
> ValueType.COMPLEX);
> Otherwise there is a contradiction in the function:
> org.apache.olingo.server.core.serializer.json.ODataJsonSerializer.writeComplexCollection
> The switch checks the value type to be COLLECTION_COMPLEX and wants to use
> the property.asComplex which currently always returns null due to the wrong
> isComplex implementation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)