Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8262277 URLClassLoader.getResource throws undocumented IllegalArgumentException
  3. JDK-8272044

Release Note: URLClassLoader No Longer Throws Undocumented IllegalArgumentException From getResource[s]() and findResource[s]()

XMLWordPrintable

      In the event that there is a problem getting a resource, `URLClassLoader.getResource()` and `findResource()` now return `null` instead of throwing an undocumented `IllegalArgumentException`. The same is true of `Enumeration`s obtained from `URLClassLoader.getResources()` and `URLClassLoader.findResources()`.

      This behavior conforms with the long-standing specification. The situation would typically occur on Windows, due to the use of a Windows-style path (`"c:/windows"`).

            bchristi Brent Christian
            bchristi Brent Christian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: