You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/11/22 10:42:35 UTC

svn commit: r1641038 - in /tomcat/trunk/java/org/apache/catalina/webresources: DirResourceSet.java FileResourceSet.java LocalStrings.properties

Author: markt
Date: Sat Nov 22 09:42:34 2014
New Revision: 1641038

URL: http://svn.apache.org/r1641038
Log:
Fix some i18n TODOs.

Modified:
    tomcat/trunk/java/org/apache/catalina/webresources/DirResourceSet.java
    tomcat/trunk/java/org/apache/catalina/webresources/FileResourceSet.java
    tomcat/trunk/java/org/apache/catalina/webresources/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/catalina/webresources/DirResourceSet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/DirResourceSet.java?rev=1641038&r1=1641037&r2=1641038&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/webresources/DirResourceSet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/DirResourceSet.java Sat Nov 22 09:42:34 2014
@@ -244,8 +244,8 @@ public class DirResourceSet extends Abst
     @Override
     protected void checkType(File file) {
         if (file.isDirectory() == false) {
-            throw new IllegalArgumentException(
-                    "TODO-i18n: base/internalPath is not a directory");
+            throw new IllegalArgumentException(sm.getString("dirResourceSet.notDirectory",
+                    getBase(), File.separator, getInternalPath()));
         }
     }
 }

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=1641038&r1=1641037&r2=1641038&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/webresources/FileResourceSet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/FileResourceSet.java Sat Nov 22 09:42:34 2014
@@ -169,8 +169,8 @@ public class FileResourceSet extends Abs
     @Override
     protected void checkType(File file) {
         if (file.isFile() == false) {
-            throw new IllegalArgumentException(
-                    "TODO-i18n: base/internalPath is not a file");
+            throw new IllegalArgumentException(sm.getString("fileResourceSet.notFile",
+                    getBase(), File.separator, getInternalPath()));
         }
     }
 }

Modified: tomcat/trunk/java/org/apache/catalina/webresources/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/LocalStrings.properties?rev=1641038&r1=1641037&r2=1641038&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/webresources/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/LocalStrings.properties Sat Nov 22 09:42:34 2014
@@ -25,12 +25,14 @@ cache.backgroundEvictFail=The background
 cache.objectMaxSizeTooBig=The value of [{0}]kB for objectMaxSize is larger than the limit of maxSize/20 so has been reduced to [{1}]kB
 cache.objectMaxSizeTooBigBytes=The value specified for the maximum object size to cache [{0}]kB is greater than Integer.MAX_VALUE bytes which is the maximum size that can be cached. The limit will be set to Integer.MAX_VALUE bytes.
 
+dirResourceSet.notDirectory=The directory specified by base and internal path [{0}][{1}][{2}] does not exist.
 dirResourceSet.writeExists=The target of the write already exists
 dirResourceSet.writeNpe=The input stream may not be null
 
 fileResource.getCanonicalPathFail=Unable to determine the canonical path for the resource [{0}]
 fileResource.getCreationFail=Unable to determine the creation time for the resource [{0}]
 fileResource.getUrlFail=Unable to determine a URL for the resource [{0}]
+fileResourceSet.notFile=The file specified by base and internal path [{0}][{1}][{2}] does not exist.
 
 jarResource.getInputStreamFail=Unable to obtain an InputStream for the resource [{0}] located in the JAR [{1}]
 jarResource.getUrlFail=Unable to determine a URL for the resource [{0}] located in the JAR [{1}]



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