tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r820954 - /tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java
Date Fri, 02 Oct 2009 10:39:21 GMT
Author: kkolinko
Date: Fri Oct  2 10:39:21 2009
New Revision: 820954

URL: http://svn.apache.org/viewvc?rev=820954&view=rev
Log:
Use proper method to construct an URL string.
File.toURI() takes care of absolute paths, trailing slashes in the names of directories, encoding
of special characters such as '%'.
Based on a suggestion by Rainer Jung.

Modified:
    tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java

Modified: tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java?rev=820954&r1=820953&r2=820954&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java (original)
+++ tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java Fri Oct  2 10:39:21
2009
@@ -91,11 +91,7 @@
             if (!file.exists()) {
                 continue;
             }
-            if (file.isDirectory()) {
-                addRepository("file:/" + file.getAbsolutePath() + "/");
-            } else {
-                addRepository("file:/" + file.getAbsolutePath());
-            }
+            addRepository(file.toURI().toString());
         }
 
         super.start();



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


Mime
View raw message