You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by "David Blevins (Jira)" <ji...@apache.org> on 2022/05/02 22:36:00 UTC

[jira] [Created] (JOHNZON-371) NullPointerException thrown when null value present in json boolean array

David Blevins created JOHNZON-371:
-------------------------------------

             Summary: NullPointerException thrown when null value present in json boolean array
                 Key: JOHNZON-371
                 URL: https://issues.apache.org/jira/browse/JOHNZON-371
             Project: Johnzon
          Issue Type: Bug
            Reporter: David Blevins
             Fix For: 1.2.19


In java 8 the user will simply get the message "null"

 

In recent java versions, the user will see the much nicer NullPointerException

 
{noformat}
Cannot invoke "java.lang.Boolean.booleanValue()" because the return value of 
"org.apache.johnzon.mapper.MappingParserImpl.toObject(Object, javax.json.JsonValue, java.lang.reflect.Type, org.apache.johnzon.mapper.Adapter, org.apache.johnzon.mapper.internal.JsonPointerTracker, java.lang.reflect.Type)" is null
{noformat}
Either way we should likely handle it and tell the user there is a null value in their json boolean array.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)