Author: wesw
Date: Thu Jun 18 13:35:03 2009
New Revision: 786061

URL: http://svn.apache.org/viewvc?rev=786061&view=rev
Log:
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

Modified:
    
struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/classloader/ReloadingClassLoader.java

Modified: 
struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/classloader/ReloadingClassLoader.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/classloader/ReloadingClassLoader.java?rev=786061&r1=786060&r2=786061&view=diff
==============================================================================
--- 
struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/classloader/ReloadingClassLoader.java
 (original)
+++ 
struts/struts2/trunk/plugins/convention/src/main/java/org/apache/struts2/convention/classloader/ReloadingClassLoader.java
 Thu Jun 18 13:35:03 2009
@@ -50,7 +50,12 @@
         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) {


Reply via email to