tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1401489 - in /tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources: AbstractFileResourceSet.java FileResourceSet.java
Date Tue, 23 Oct 2012 21:18:25 GMT
Author: markt
Date: Tue Oct 23 21:18:24 2012
New Revision: 1401489

URL: http://svn.apache.org/viewvc?rev=1401489&view=rev
Log:
Review use of '/'

Modified:
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/AbstractFileResourceSet.java
    tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResourceSet.java

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/AbstractFileResourceSet.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/AbstractFileResourceSet.java?rev=1401489&r1=1401488&r2=1401489&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/AbstractFileResourceSet.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/AbstractFileResourceSet.java
Tue Oct 23 21:18:24 2012
@@ -65,7 +65,7 @@ public abstract class AbstractFileResour
             //       agrees with what was requested
             String fileAbsPath = file.getAbsolutePath();
             if (fileAbsPath.endsWith("."))
-                fileAbsPath = fileAbsPath + "/";
+                fileAbsPath = fileAbsPath + '/';
             String absPath = normalize(fileAbsPath);
             if ((absoluteBase.length() < absPath.length())
                 && (canonicalBase.length() < canPath.length())) {
@@ -106,7 +106,7 @@ public abstract class AbstractFileResour
 
         String absolutePath = fileBase.getAbsolutePath();
         if (absolutePath.endsWith(".")) {
-            absolutePath = absolutePath + "/";
+            absolutePath = absolutePath + '/';
         }
         this.absoluteBase = normalize(absolutePath);
 

Modified: tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResourceSet.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResourceSet.java?rev=1401489&r1=1401488&r2=1401489&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResourceSet.java
(original)
+++ tomcat/sandbox/trunk-resources/java/org/apache/catalina/webresources/FileResourceSet.java
Tue Oct 23 21:18:24 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);
@@ -95,9 +95,9 @@ public class FileResourceSet extends Abs
         checkPath(path);
 
         if (path.charAt(path.length() - 1) != '/') {
-            path = path + "/";
+            path = path + '/';
         }
-        String webappMount = "/" + getWebAppMount();
+        String webappMount = '/' + getWebAppMount();
 
         if (webappMount.startsWith(path)) {
             webappMount = webappMount.substring(path.length());
@@ -115,9 +115,9 @@ public class FileResourceSet extends Abs
         ResourceSet<String> result = new ResourceSet<>();
 
         if (path.charAt(path.length() - 1) != '/') {
-            path = path + "/";
+            path = path + '/';
         }
-        String webappMount = "/" + getWebAppMount();
+        String webappMount = '/' + getWebAppMount();
 
         if (webappMount.startsWith(path)) {
             webappMount = webappMount.substring(path.length());



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


Mime
View raw message