johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michele Vivoda (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JOHNZON-111) readObject throws ClassCastException if json array is passed
Date Sun, 26 Mar 2017 23:16:41 GMT

    [ https://issues.apache.org/jira/browse/JOHNZON-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15942484#comment-15942484
] 

Michele Vivoda commented on JOHNZON-111:
----------------------------------------

A gist of my proposed fix https://gist.github.com/eleumik/914d0e93e3b9d7014a4a9cd967b54c3b

> readObject throws ClassCastException if json array is passed
> ------------------------------------------------------------
>
>                 Key: JOHNZON-111
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-111
>             Project: Johnzon
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.9.5
>            Reporter: Michele Vivoda
>            Priority: Trivial
>
> the javax.json.JsonReader.readObject() method implementation in org.apache.johnzon.core.JsonReaderImpl.readObject()
throws ClassCastException if a json array like "[]" is passed to it, instead it should throw
JsonParsingException if the JsonStructure returned by org.apache.johnzon.core.JsonReaderImpl.read()
is not a JsonObject



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message