[
https://issues.apache.org/jira/browse/OLINGO-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15926736#comment-15926736
]
Torgil Zethson commented on OLINGO-1089:
----------------------------------------
An update on this: It turns out that the bug is not reproducible in the latest
version, which uses the Aalto XML parser. That parser seems to consistently
deliver the entire value in one go. We are using an older olingo version, that
gets the XML parser from the runtime (XMLInputFactory.newInstance()), and in
our case it picks up a parser that chunks the values.
Please feel free to close this bug as invalid.
> AtomDeserializer does not handle multi-line values correctly
> ------------------------------------------------------------
>
> Key: OLINGO-1089
> URL: https://issues.apache.org/jira/browse/OLINGO-1089
> Project: Olingo
> Issue Type: Bug
> Components: odata4-client
> Affects Versions: (Java) V4 4.0.0
> Reporter: Torgil Zethson
> Attachments: pam_test_metadata, pam_test_payload.xml
>
>
> We are receiving an OData4 atom payload from a customer, where the value of
> one of the fields contain multiple line breaks. (See attachment.) The field
> is of type Edm.String. The value that comes out of the olingo
> deserialization, however, only has the two last lines of the value.
> The field in the payload looks like so:
> <d:VALUE>1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 12</d:VALUE>
> What comes out of the deserialization is
> "11
> 12"
> I believe the problem is in AtomDeserializer, in the method fromPrimitive().
> There is a while-loop there, that loops until the end of the property has
> been read. However, only the value of the last chunk is retained. In our
> case, the StAX parser delivers the character data of this fields two lines at
> a time. As a result, the end result contains only the last two lines of the
> value.
> As far as I can tell, the payload follows the OData4 Atom standard as defined
> here:
> http://docs.oasis-open.org/odata/odata-atom-format/v4.0/odata-atom-format-v4.0.html
> The standard also has an example that explicitly mentions line breaks,
> "Example 8" here:
> http://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs02/odata-atom-format-v4.0-cs02.html#_Toc372792712
> I'm attaching the payload in question, as well as the metadata for the entity.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)