[
https://issues.apache.org/jira/browse/LOG4J2-2751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17005761#comment-17005761
]
ASF subversion and git services commented on LOG4J2-2751:
---------------------------------------------------------
Commit 80360db49acc192eee631006349f37fae469d061 in logging-log4j2's branch
refs/heads/release-2.x from Carter Kozak
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=80360db ]
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)