[ 
https://issues.apache.org/jira/browse/OLINGO-1250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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 'yyyy-mm-ddThh:mm[:ss[.fffffff]]'
>  <Property Name="LastChangeDateTime" Type="Edm.DateTime" Precision="7">
> <d:LastChangeDateTime>2018-03-20T15:21:56.5403390</d:LastChangeDateTime>
> internalValueOfString throws an error in this section:
> {code:java}
> nanoSeconds = Integer.parseInt(decimals + 
> "000000000".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)

Reply via email to