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

Remko Popma resolved LOG4J2-1281.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.6

Fixed in master in commit 3458ea9.

> LoggerConfig.getProperties() should not allocate on each call
> -------------------------------------------------------------
>
>                 Key: LOG4J2-1281
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1281
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.5
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>             Fix For: 2.6
>
>
> LoggerConfig.getProperties() is currently implemented as
> {code}
> public Map<Property, Boolean> getProperties() {
>     return properties == null ? null : 
> Collections.unmodifiableMap(properties);
> }
> {code}
> this creates a new {{UnmodifiableMap}} object for each call.
> We can wrap the {{properties}} field with {{Collections.unmodifiableMap}} in 
> the constructor, so there is no need to do this on every call.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to