Dmitri created OLINGO-1236:
------------------------------

             Summary: Json deserializer fails to parse NaN value
                 Key: OLINGO-1236
                 URL: https://issues.apache.org/jira/browse/OLINGO-1236
             Project: Olingo
          Issue Type: Bug
          Components: odata4-server
    Affects Versions: (Java) V4 4.4.0
            Reporter: Dmitri


Olingo should allow parsing NaN by default due OData4 specification:

objectMapper.configure(JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS, true);

Stacktrace:

Caused by: com.fasterxml.jackson.core.JsonParseException: Non-standard token 
'NaN': enable JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS to allow
 at [Source: org.apache.cxf.transport.http.AbstractHTTPDestination$1@152e0b90; 
line: 1, column: 416]
    at 
com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1586)
    at 
com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:521)
    at 
com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2609)
    at 
com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextFieldName(UTF8StreamJsonParser.java:1069)
    at 
com.fasterxml.jackson.databind.deser.std.BaseNodeDeserializer.deserializeObject(JsonNodeDeserializer.java:219)
    at 
com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:69)
    at 
com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer.deserialize(JsonNodeDeserializer.java:15)
    at 
com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3708)
    at 
com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:2113)
    at 
org.apache.olingo.server.core.deserializer.json.ODataJsonDeserializer.parseJsonTree(ODataJsonDeserializer.java:230)
    at 
org.apache.olingo.server.core.deserializer.json.ODataJsonDeserializer.entity(ODataJsonDeserializer.java:175)
    ... 35 more



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to