[
https://issues.apache.org/jira/browse/OLINGO-1250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16431792#comment-16431792
]
Volker Jordan commented on OLINGO-1250:
---
Its also happenig in DateTimeOffset
> V2 EdmDateTime wrong validation
> ---
>
> Key: OLINGO-1250
> URL: https://issues.apache.org/jira/browse/OLINGO-1250
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
>Affects Versions: V2 2.0.10
>Reporter: Volker Jordan
>Priority: Major
>
> Hi,
> the logic of validating a EdmDateTime is broken. In case I get a correct
> EdmDateTime in the pattern '-mm-ddThh:mm[:ss[.fff]]'
>
> 2018-03-20T15:21:56.5403390
> internalValueOfString throws an error in this section:
> {code:java}
> nanoSeconds = Integer.parseInt(decimals +
> "0".substring(decimals.length()));
> if (!(returnType.isAssignableFrom(Timestamp.class))) {
> if (nanoSeconds % (1000 * 1000) == 0) {
> dateTimeValue.set(Calendar.MILLISECOND, nanoSeconds / (1000 * 1000));
> } else {
> throw new
> EdmSimpleTypeException(EdmSimpleTypeException.LITERAL_ILLEGAL_CONTENT.addContent(value));
> }
> }{code}
> I havent yet figured out what those lines try to accomplish, but I think its
> wrong and crashes the communication with an SAP backend.
>
> Regards
> Volker
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)