You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/03/27 14:16:00 UTC

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

     [ https://issues.apache.org/jira/browse/LOG4J2-2809?focusedWorklogId=411096&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411096 ]

ASF GitHub Bot logged work on LOG4J2-2809:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Mar/20 14:15
            Start Date: 27/Mar/20 14:15
    Worklog Time Spent: 10m 
      Work Description: rmannibucau commented on pull request #356: [LOG4J2-2809] avoid NPE because the stacklocator returned null
URL: https://github.com/apache/logging-log4j2/pull/356
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 411096)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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
>          Time Spent: 10m
>  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)