You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (Jira)" <ji...@apache.org> on 2020/03/21 23:15:00 UTC

[jira] [Assigned] (LOG4J2-2809) java.lang.NullPointerException at java9 org.apache.logging.log4j.util.StackLocator.calcLocation()

     [ https://issues.apache.org/jira/browse/LOG4J2-2809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralph Goers reassigned LOG4J2-2809:
-----------------------------------

    Assignee: Ralph Goers

> 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
>
> When log() is called from a class using an instance created/stored at ThreadLocal 
> its StackWalker.StackFrame names changes to "WrappingClass$ClassFromThreadLocal".
> This causes to throw 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)