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

NPE in ClassLoaderUtils

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.11
    • 3.1.12, 3.2.0
    • Core
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: