diff --git a/slf4j-api/src/main/java/org/slf4j/helpers/ThreadLocalMapOfStacks.java b/slf4j-api/src/main/java/org/slf4j/helpers/ThreadLocalMapOfStacks.java index 58eb71f7c..89ddee0ea 100644 --- a/slf4j-api/src/main/java/org/slf4j/helpers/ThreadLocalMapOfStacks.java +++ b/slf4j-api/src/main/java/org/slf4j/helpers/ThreadLocalMapOfStacks.java @@ -15,6 +15,9 @@ */ public class ThreadLocalMapOfStacks { + // BEWARE: Keys or values placed in a ThreadLocal should not be of a type/class + // not included in the JDK. See also https://jira.qos.ch/browse/LOGBACK-450 + final ThreadLocal>> tlMapOfStacks = new ThreadLocal<>(); public void pushByKey(String key, String value) {