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

StackLocator.getCallerClass throws and catches unnecessarily internally in some cases

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.13.0
    • 2.13.1
    • None
    • 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

            ckozak Carter Kozak
            ckozak Carter Kozak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: