You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Romain Manni-Bucau (Jira)" <ji...@apache.org> on 2019/09/23 06:57:00 UTC
[jira] [Resolved] (GERONIMO-6751) JSON-P 1.1 incompliance:
EmptyJsonObject incorrectly answers getString and isNull
[ https://issues.apache.org/jira/browse/GERONIMO-6751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Romain Manni-Bucau resolved GERONIMO-6751.
------------------------------------------
Fix Version/s: JSONP_1.3
Resolution: Fixed
Applied the PR, thanks a lot
> 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
> Fix For: JSONP_1.3
>
>
> * 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)