tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1401696 - in /tomcat/trunk: java/org/apache/catalina/webresources/FileResourceSet.java test/org/apache/catalina/webresources/TestFileResourceSet.java
Date Wed, 24 Oct 2012 14:03:42 GMT
Author: markt
Date: Wed Oct 24 14:03:42 2012
New Revision: 1401696

URL: http://svn.apache.org/viewvc?rev=1401696&view=rev
Log:
Some leading '/' consistency

Modified:
    tomcat/trunk/java/org/apache/catalina/webresources/FileResourceSet.java
    tomcat/trunk/test/org/apache/catalina/webresources/TestFileResourceSet.java

Modified: tomcat/trunk/java/org/apache/catalina/webresources/FileResourceSet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/FileResourceSet.java?rev=1401696&r1=1401695&r2=1401696&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/webresources/FileResourceSet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/FileResourceSet.java Wed Oct 24 14:03:42
2012
@@ -77,7 +77,7 @@ public class FileResourceSet extends Abs
     public WebResource getResource(String path) {
         checkPath(path);
 
-        String webAppMount = '/' + getWebAppMount();
+        String webAppMount = getWebAppMount();
         WebResourceRoot root = getRoot();
         if (path.equals(webAppMount)) {
             File f = file("", true);
@@ -97,7 +97,7 @@ public class FileResourceSet extends Abs
         if (path.charAt(path.length() - 1) != '/') {
             path = path + '/';
         }
-        String webappMount = '/' + getWebAppMount();
+        String webappMount = getWebAppMount();
 
         if (webappMount.startsWith(path)) {
             webappMount = webappMount.substring(path.length());
@@ -117,7 +117,7 @@ public class FileResourceSet extends Abs
         if (path.charAt(path.length() - 1) != '/') {
             path = path + '/';
         }
-        String webappMount = '/' + getWebAppMount();
+        String webappMount = getWebAppMount();
 
         if (webappMount.startsWith(path)) {
             webappMount = webappMount.substring(path.length());

Modified: tomcat/trunk/test/org/apache/catalina/webresources/TestFileResourceSet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/webresources/TestFileResourceSet.java?rev=1401696&r1=1401695&r2=1401696&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/webresources/TestFileResourceSet.java (original)
+++ tomcat/trunk/test/org/apache/catalina/webresources/TestFileResourceSet.java Wed Oct 24
14:03:42 2012
@@ -33,19 +33,19 @@ public class TestFileResourceSet extends
         root.setWebResourceSet(webResourceSet);
 
         WebResourceSet f1 = new FileResourceSet(root,
-                "test/webresources/dir1/f1.txt", "f1.txt", "");
+                "test/webresources/dir1/f1.txt", "/f1.txt", "");
         root.addPreResources(f1);
 
         WebResourceSet f2 = new FileResourceSet(root,
-                "test/webresources/dir1/f2.txt", "f2.txt", "");
+                "test/webresources/dir1/f2.txt", "/f2.txt", "");
         root.addPreResources(f2);
 
         WebResourceSet d1f1 = new FileResourceSet(root,
-                "test/webresources/dir1/d1/d1-f1.txt", "d1/d1-f1.txt", "");
+                "test/webresources/dir1/d1/d1-f1.txt", "/d1/d1-f1.txt", "");
         root.addPreResources(d1f1);
 
         WebResourceSet d2f1 = new FileResourceSet(root,
-                "test/webresources/dir1/d2/d2-f1.txt", "d2/d2-f1.txt", "");
+                "test/webresources/dir1/d2/d2-f1.txt", "/d2/d2-f1.txt", "");
         root.addPreResources(d2f1);
 
         return root;



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


Mime
View raw message