-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
apiAffects the public APIAffects the public APIbugIncorrect, unexpected, or unintended behavior of existing codeIncorrect, unexpected, or unintended behavior of existing codegood first issueIssues that are good for contributors looking to get startedIssues that are good for contributors looking to get startedslf4jAffects SLF4J integrationAffects SLF4J integration
Milestone
Description
Description
MDCContextMap::getCopy
delegates to MDC::getCopyOfContextMap
which is documented as potentially returning null
. This fact is respected within MDCContextMap
, but ThreadContextMap::getCopy
is documented as returning a non-null value. In CloseableThreadContext.Instance
, this causes NullPointerException
s in the putAll
method when ThreadContext::getContext
is invoked and later used.
Configuration
Version: 2.20.0
Operating system: [OS and version]
JDK: [JDK distribution and version]
Logs
java.lang.NullPointerException: null
at org.apache.logging.log4j.CloseableThreadContext$Instance.putAll(CloseableThreadContext.java:170)
at org.apache.logging.log4j.CloseableThreadContext.putAll(CloseableThreadContext.java:100)
Reproduction
[An isolated test reproducing the test.
JUnit tests similar to the ones in the code base are extremely appreciated.]
Metadata
Metadata
Assignees
Labels
apiAffects the public APIAffects the public APIbugIncorrect, unexpected, or unintended behavior of existing codeIncorrect, unexpected, or unintended behavior of existing codegood first issueIssues that are good for contributors looking to get startedIssues that are good for contributors looking to get startedslf4jAffects SLF4J integrationAffects SLF4J integration