mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
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:
+6
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user