Class Unbox.WebSafeState

java.lang.Object
org.apache.logging.log4j.util.Unbox.WebSafeState
Enclosing class:
Unbox

private static class Unbox.WebSafeState extends 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 Details

  • Constructor Details

    • WebSafeState

      private WebSafeState()
  • Method Details

    • getStringBuilder

      public StringBuilder getStringBuilder()
    • isBoxedPrimitive

      public boolean isBoxedPrimitive(StringBuilder text)