Author: ggregory
Date: Mon Jul 23 15:37:37 2018
New Revision: 1836500
URL: http://svn.apache.org/viewvc?rev=1836500&view=rev
Log:
[VFS-667]
org.apache.commons.vfs2.provider.res.ResourceFileProvider.findFile(FileObject,
String, FileSystemOptions) should throw a
org.apache.commons.vfs2.FileSystemException instead of a NPE when the class
loader is null.
Modified:
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileProvider.java
commons/proper/vfs/trunk/src/changes/changes.xml
Modified:
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileProvider.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileProvider.java?rev=1836500&r1=1836499&r2=1836500&view=diff
==============================================================================
---
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileProvider.java
(original)
+++
commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileProvider.java
Mon Jul 23 15:37:37 2018
@@ -64,6 +64,9 @@ public class ResourceFileProvider extend
if (cl == null) {
cl = getClass().getClassLoader();
}
+ if (cl == null) {
+ throw new
FileSystemException("vfs.provider.url/badly-formed-uri.error", uri);
+ }
final URL url = cl.getResource(resourceName);
if (url == null) {
Modified: commons/proper/vfs/trunk/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1836500&r1=1836499&r2=1836500&view=diff
==============================================================================
--- commons/proper/vfs/trunk/src/changes/changes.xml (original)
+++ commons/proper/vfs/trunk/src/changes/changes.xml Mon Jul 23 15:37:37 2018
@@ -77,6 +77,9 @@ The <action> type attribute can be add,u
<action issue="VFS-666" dev="ggregory" type="update">
Update Apache Commons Collections from 4.1 to 4.2.
</action>
+ <action issue="VFS-667" dev="ggregory" type="fix">
+
org.apache.commons.vfs2.provider.res.ResourceFileProvider.findFile(FileObject,
String, FileSystemOptions) should throw a
org.apache.commons.vfs2.FileSystemException instead of a NPE when the class
loader is null.
+ </action>
</release>
<release version="2.2" date="2017-10-06" description="New features and bug
fix release.">
<action issue="VFS-642" dev="pschumacher" type="update"
due-to="ilangoldfeld">