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

Markus Jung commented on JOHNZON-408:
-------------------------------------

don't quite understand your issue, both the old [geronimo json 
api|https://github.com/apache/geronimo-specs/blob/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/JsonValue.java#L27]
 and [jakartaee json 
API|https://github.com/jakartaee/jsonp-api/blob/master/api/src/main/java/jakarta/json/JsonValue.java#L37]
 don't delegate JsonValue.EMPTY_JSON_OBJECT to the JSON-P implementation and 
instead handle it internally.

Your test is also working fine when ran directly in the johnzon code. Can you 
maybe describe the environment where you encountered this issue? Specifically, 
which JSON-P api jar are you using?

> JsonValue.EMPTY_JSON_OBJECT is null
> -----------------------------------
>
>                 Key: JOHNZON-408
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-408
>             Project: Johnzon
>          Issue Type: Bug
>          Components: Core
>            Reporter: Niclas Hedhman
>            Priority: Major
>
> JsonValue.EMPTY_JSON_OBJECT is set to null, because the initialization of 
> that instance is calling the JsonObjectBuilderImpl.build() which returns 
> itself if it is an empty `attributeMap`.
> See comment
> https://github.com/apache/johnzon/commit/50a64d59a81384fe400570e36fc93ce7e2347746#r145601781
> for the exact time when this was broken, and the ultra-simple test for it. 
> And the previous code worked, but someone thought to be "clever" and no tests 
> capturing it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to