Package org.apache.logging.log4j.util
Class Unbox.WebSafeState
- java.lang.Object
-
- org.apache.logging.log4j.util.Unbox.WebSafeState
-
- Enclosing class:
- Unbox
private static class Unbox.WebSafeState extends java.lang.Object
State implementation that only puts JDK classes in ThreadLocals, so this is safe to be used from web applications. Web application containers have thread pools that may hold on to ThreadLocal objects after the application was stopped. This may prevent the classes of the application from being unloaded, causing memory leaks.Such memory leaks will not occur if only JDK classes are stored in ThreadLocals.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ThreadLocal<int[]>
current
private java.lang.ThreadLocal<java.lang.StringBuilder[]>
ringBuffer
-
Constructor Summary
Constructors Modifier Constructor Description private
WebSafeState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuilder
getStringBuilder()
boolean
isBoxedPrimitive(java.lang.StringBuilder text)
-