You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Michael Burwig (JIRA)" <ji...@apache.org> on 2014/12/01 13:21:12 UTC
[jira] [Created] (OLINGO-501) ODataJsonSerializer fails to write
Collections of Complex Properties
Michael Burwig created OLINGO-501:
-------------------------------------
Summary: ODataJsonSerializer fails to write Collections of Complex Properties
Key: OLINGO-501
URL: https://issues.apache.org/jira/browse/OLINGO-501
Project: Olingo
Issue Type: Bug
Components: odata4-server
Affects Versions: V4 4.0.0-beta-01, (Java) V4 4.0.0-beta-02
Reporter: Michael Burwig
Priority: Critical
Affected Method:
org.apache.olingo.server.core.serializer.json.ODataJsonSerializer.writeComplexCollection(type, property, ...)
The method writeComplexCollection iterates over the properties of a collection of properties and calls writeComplexValue(...).
{code:title=ODataJsonSerializer.java|borderStyle=solid}
...
for (Object value : property.asCollection()) {
switch (property.getValueType()) {
case COLLECTION_LINKED_COMPLEX:
writeComplexValue(type, ((LinkedComplexValue) value).getValue(), selectedPaths, json);
break;
case COLLECTION_COMPLEX:
writeComplexValue(type, property.asComplex(), selectedPaths, json);
break;
...
{code}
The COLLECTION_COMPLEX case seems broken and should rather be something like:
{code:title=ODataJsonSerializer.java|borderStyle=solid}
...
case COLLECTION_COMPLEX:
writeComplexValue(type, ((Property) value).asComplex(), selectedPaths, json);
break;
...
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)