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

LoaderUtil.getClassLoaders fails to update loop state

    XMLWordPrintableJSON

    Details

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

      Description

      Same problem as LOG4J2-2104, but for final 'ClassLoader current = LoaderUtil.class.getClassLoader();'

      The while loop acts as a simple conditional (unless a classloader is defined with an incorrect 'equals' method, then it loops infinitely – I've not seen this behavior in practice though).

      It appears that getThreadContextClassLoader can return a null ClassLoader, which ends up in the getClassLoaders result erroneously.

        Attachments

          Issue Links

            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:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h