WW-3163, fixing NPE, but throwing StrutsException instead, not a great fix, but when I get a chance to work closer with JBoss, I will come back to this

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@786061 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Wesley Wannemacher
2009-06-18 13:35:03 +00:00
parent d8e5ea68d9
commit 3dbd0294e8
@@ -50,7 +50,12 @@ public class ReloadingClassLoader extends ClassLoader {
parent = pParent;
URL root = pParent.getResource("/");
try {
stores = new ResourceStore[]{new FileResourceStore(new File(root.toURI()))};
if (root != null) {
stores = new ResourceStore[]{new FileResourceStore(new File(root.toURI()))};
}
else {
throw new StrutsException("Unable to start the reloadable class loader, consider setting 'struts.convention.classes.reload' to false");
}
} catch (URISyntaxException e) {
throw new StrutsException("Unable to start the reloadable class loader, consider setting 'struts.convention.classes.reload' to false", e);
} catch (RuntimeException e) {