Niclas Hedhman created JOHNZON-408:
--------------------------------------
Summary: 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
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)