Commits

Anonymous committed 7bb3e01

WW-3121 Normalize URLs from classloader

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@2034e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 832af9c

Comments (0)

Files changed (1)

File core/src/main/java/com/opensymphony/xwork2/util/classloader/ReloadingClassLoader.java

 import com.opensymphony.xwork2.util.logging.Logger;
 import com.opensymphony.xwork2.util.logging.LoggerFactory;
 import com.opensymphony.xwork2.util.classloader.FileResourceStore;
+import com.opensymphony.xwork2.util.URLUtil;
 import com.opensymphony.xwork2.XWorkException;
 
 import java.io.InputStream;
     public ReloadingClassLoader(final ClassLoader pParent) {
         super(pParent);
         parent = pParent;
-        URL root = pParent.getResource("");
+        URL root = URLUtil.normalizeToFileProtocol(pParent.getResource(""));
         try {
             if (root != null) {
-                stores = new ResourceStore[]{new FileResourceStore(new File(root.toURI()))};
+                stores = new ResourceStore[]{new FileResourceStore(new File( root.toURI()))};
             }
             else {
                 throw new XWorkException("Unable to start the reloadable class loader, consider setting 'struts.convention.classes.reload' to false");