[
https://issues.apache.org/jira/browse/LOG4J2-2751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17005762#comment-17005762
]
ASF subversion and git services commented on LOG4J2-2751:
---------------------------------------------------------
Commit 7c9e30644f57f6c0d7c4406b87b613bc7502c922 in logging-log4j2's branch
refs/heads/master from Carter Kozak
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=7c9e306 ]
LOG4J2-2751: Avoid unnecessary throw/catch in StackLocator.getCallerClass
This issue only impacted environments where Reflection.getCallerClass is
not accessible.
> 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
> Assignee: Carter Kozak
> Priority: Major
> 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)