Author: markt
Date: Wed Jun 20 12:36:39 2012
New Revision: 1352066

URL: http://svn.apache.org/viewvc?rev=1352066&view=rev
Log:
Port clean-up from trunk

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1352056,1352059

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1352066&r1=1352065&r2=1352066&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
Wed Jun 20 12:36:39 2012
@@ -1775,11 +1775,11 @@ public class WebappClassLoader
                 off = externalsLength;
             }
             for (i = 0; i < filesLength; i++) {
-                urls[off + i] = getURL(files[i], true);
+                urls[off + i] = getURI(files[i]);
             }
             off += filesLength;
             for (i = 0; i < jarFilesLength; i++) {
-                urls[off + i] = getURL(jarRealFiles[i], true);
+                urls[off + i] = getURI(jarRealFiles[i]);
             }
             off += jarFilesLength;
             if (!searchExternalFirst) {
@@ -2928,7 +2928,7 @@ public class WebappClassLoader
         ResourceEntry entry = new ResourceEntry();
         try {
             entry.source = getURI(new File(file, path));
-            entry.codeBase = getURL(new File(file, path), false);
+            entry.codeBase = entry.source;
         } catch (MalformedURLException e) {
             return null;
         }
@@ -3062,8 +3062,8 @@ public class WebappClassLoader
 
                         entry = new ResourceEntry();
                         try {
-                            entry.codeBase = getURL(jarRealFiles[i], false);
-                            String jarFakeUrl = 
getURI(jarRealFiles[i]).toString();
+                            entry.codeBase = getURI(jarRealFiles[i]);
+                            String jarFakeUrl = entry.codeBase.toString();
                             jarFakeUrl = "jar:" + jarFakeUrl + "!/" + path;
                             entry.source = new URL(jarFakeUrl);
                             entry.lastModified = 
jarRealFiles[i].lastModified();
@@ -3449,7 +3449,9 @@ public class WebappClassLoader
 
     /**
      * Get URL.
+     * @deprecated Use {@link #getURI(File)} instead
      */
+    @Deprecated
     protected URL getURL(File file, boolean encoded)
         throws MalformedURLException {
 
@@ -3468,7 +3470,7 @@ public class WebappClassLoader
 
 
     /**
-     * Get URL.
+     * Get the URI for the given file.
      */
     protected URL getURI(File file)
         throws MalformedURLException {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to