Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Nightly Builds
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
31041
Description
XMLConfiguration throws a NullPointerException if an invalid resource name is
passed to its constructor, it should throw a ConfigurationException explaining
the issue instead.
Fix suggested by Ben Hutchison:
private static File resourceURLToFile(String resource) {
URL confURL = XMLConfiguration.class.getClassLoader().getResource(resource);
if (confURL == null)
if (confURL == null)
throw new IllegalArgumentException("Resource:"resource" not found
thru context or system classloaders.");
return new File(confURL.getFile());
}