Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7349

NPE in ClassLoaderUtils

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.11
    • Fix Version/s: 3.1.12, 3.2.0
    • Component/s: Core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      A NullPointerException can be thrown when the JVM's boot classloader is set as the thread's context classloader. Ex:

      URL url = Thread.currentThread().getContextClassLoader().getResource(resourceName);

      The call to getContextClassLoader() could return null - that is a valid return from that method. In that case, we should use ClassLoader.getSystemClassLoader() instead.

      This issue was reported on in the users mailing list:
      http://cxf.547215.n5.nabble.com/NPE-in-cxf-core-ClassLoaderUtils-possible-bug-td5780007.html

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andymc Andrew J McMurry
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: