[
https://issues.apache.org/jira/browse/GERONIMO-6751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16935285#comment-16935285
]
Markus Karg commented on GERONIMO-6751:
---------------------------------------
See [Apache Geronimo PR|https://github.com/apache/geronimo-specs/pull/15]
> JSON-P 1.1 incompliance: EmptyJsonObject incorrectly answers getString and
> isNull
> ---------------------------------------------------------------------------------
>
> Key: GERONIMO-6751
> URL: https://issues.apache.org/jira/browse/GERONIMO-6751
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: specs
> Affects Versions: Spec_JSONP11_1.1
> Reporter: Markus Karg
> Priority: Blocker
>
> * The [JSON-P
> API]([https://github.com/eclipse-ee4j/jsonp/blob/5735bb62715578633d5721bf583b837506bbec73/api/src/main/java/javax/json/JsonObject.java#L164-L165])
> requires `JsonObject.getString("missing")` to throw `NullPointerException`
> for non-existent key `"missing"`.
> *
> [Geronimo]([https://github.com/apache/geronimo-specs/blob/0f0956795ad0839ec698e11fd3a7049f0114623c/geronimo-json_1.1_spec/src/main/java/javax/json/EmptyJsonObject.java#L51-L52)'s]
> variant of the JSON-P API (`EmptyJsonObject`) **incorrectly** returns `null`
> instead of throwing an exception.
>
> * The [JSON-P
> API]([https://github.com/eclipse-ee4j/jsonp/blob/5735bb62715578633d5721bf583b837506bbec73/api/src/main/java/javax/json/JsonObject.java#L172-L175])
> requires `JsonObject.getString("missing", "default")` to return `"default"`
> for non-existent key `"missing"`.
> *
> [Geronimo]([https://github.com/apache/geronimo-specs/blob/0f0956795ad0839ec698e11fd3a7049f0114623c/geronimo-json_1.1_spec/src/main/java/javax/json/EmptyJsonObject.java#L55-L58)'s]
> variant of the JSON-P API (`EmptyJsonObject`) **incorrectly** returns `null`
> instead of `"default"`.
>
> * The [JSON-P
> API]([https://github.com/eclipse-ee4j/jsonp/blob/5735bb62715578633d5721bf583b837506bbec73/api/src/main/java/javax/json/JsonObject.java#L244-L245])
> requires `JsonObject.isNull("missing")` to throw `NullPointerException` for
> non-existent key `"missing"`.
> *
> [Geronimo]([https://github.com/apache/geronimo-specs/blob/0f0956795ad0839ec698e11fd3a7049f0114623c/geronimo-json_1.1_spec/src/main/java/javax/json/EmptyJsonObject.java#L80-L83)'s]
> variant of the JSON-P API (`EmptyJsonObject`) **incorrectly** returns `true`
> instead of throwing an exception.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)