Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2751

StackLocator.getCallerClass throws and catches unnecessarily internally in some cases

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.13.0
    • Fix Version/s: 2.13.1
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              ckozak Carter Kozak
              Reporter:
              ckozak Carter Kozak
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: