[
https://issues.apache.org/jira/browse/LOG4J2-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ralph Goers resolved LOG4J2-2809.
---------------------------------
Fix Version/s: 2.13.2
Resolution: Fixed
Patch has been applied. Please verify and close.
> java.lang.NullPointerException at java9
> org.apache.logging.log4j.util.StackLocator.calcLocation()
> --------------------------------------------------------------------------------------------------
>
> Key: LOG4J2-2809
> URL: https://issues.apache.org/jira/browse/LOG4J2-2809
> Project: Log4j 2
> Issue Type: Bug
> Reporter: Andre Elis
> Assignee: Ralph Goers
> Priority: Major
> Fix For: 2.13.2
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> When log() is called from a class using an instance created/stored at
> ThreadLocal
> its StackWalker.StackFrame names changes to
> "WrappingClass$ClassFromThreadLocal".
> This causes NPE because walker.walk(LOCATOR) returns null.
> {code:java}
> StackTraceElement element = walker.walk(LOCATOR).toStackTraceElement();
> {code}
> It is suggested to check the result of walk() for null-ness and react in the
> way different from NPE.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)