You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Carter Kozak (Jira)" <ji...@apache.org> on 2019/12/30 19:00:00 UTC

[jira] [Created] (LOG4J2-2751) StackLocator.getCallerClass throws and catches unnecessarily internally in some cases

Carter Kozak created LOG4J2-2751:
------------------------------------

             Summary: StackLocator.getCallerClass throws and catches unnecessarily internally in some cases
                 Key: LOG4J2-2751
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2751
             Project: Log4j 2
          Issue Type: Improvement
    Affects Versions: 2.13.0
            Reporter: Carter Kozak
             Fix For: 2.13.1


In cases when 'WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.' is logged, invocations of 'getCallerClass' internally attempt a dynamic method invocation using a null Method reference, but catch the null pointer exception and return null.
We should do a null check first to avoid unnecessary work.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)