You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2016/02/19 12:08:18 UTC
[jira] [Created] (LOG4J2-1281) LoggerConfig.getProperties() should
not allocate on each call
Remko Popma created LOG4J2-1281:
-----------------------------------
Summary: 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
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org