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

Markus Karg commented on JOHNZON-278:
-------------------------------------

Implemented with PR [https://github.com/apache/johnzon/pull/46] (draft mode due 
to bugs _in Geronimo JSON-P API JARs_).

> Return constant instead of new instance of empty block / empty array
> --------------------------------------------------------------------
>
>                 Key: JOHNZON-278
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-278
>             Project: Johnzon
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Markus Karg
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Even in these days of modern Java, reducing memory consumption, GC stress and 
> memory fragmentation, are beneficial side aspects.
> If makes no sense to create new *empty* instances of JsonArray and JsonObject 
> again and again. For this case, JSON-P provides special *constants*.
> It makes sense to return these constants always.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to