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 Bolz (JIRA)" <ji...@apache.org> on 2014/12/09 15:21:12 UTC

[jira] [Assigned] (OLINGO-501) ODataJsonSerializer fails to write Collections of Complex Properties

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

Michael Bolz reassigned OLINGO-501:
-----------------------------------

    Assignee: Michael Bolz

> 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
>            Assignee: Michael Bolz
>            Priority: Critical
>              Labels: easyfix
>         Attachments: fix_501.patch
>
>
> 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)