You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by "Markus Jung (Jira)" <ji...@apache.org> on 2024/08/21 13:26:00 UTC

[jira] [Assigned] (JOHNZON-408) JsonValue.EMPTY_JSON_OBJECT is null

     [ https://issues.apache.org/jira/browse/JOHNZON-408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Markus Jung reassigned JOHNZON-408:
-----------------------------------

    Assignee: Markus Jung

> 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
>            Assignee: Markus Jung
>            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)