Remko Popma created LOG4J2-1417:
-----------------------------------
Summary: Unbox should respect Constants.ENABLE_THREADLOCALS
Key: LOG4J2-1417
URL: https://issues.apache.org/jira/browse/LOG4J2-1417
Project: Log4j 2
Issue Type: Bug
Components: API
Affects Versions: 2.6, 2.6.1
Reporter: Remko Popma
The org.apache.logging.log4j.util.Unbox class stores a non-JDK class
(Unbox$State) in a static ThreadLocal field.
This may cause memory leaks in containers which share thread pools between
applications.
One way to accomplish this is to have two ThreadLocal fields: one that stores
an array of StringBuilders, and one that stores an AtomicLong to track the
current slot.
(If there is a performance impact we can switch between alternative
implementations depending on the value of Constants.ENABLE_THREADLOCALS.)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]