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 2019/11/12 10:49:19 UTC

[tomcat] branch 8.5.x updated: Polish. Align with 7.0.x/9.0.x. Use i18n.

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new f13511f  Polish. Align with 7.0.x/9.0.x. Use i18n.
f13511f is described below

commit f13511f09f38a8dc28b87d13e1a4620105d2df51
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Nov 12 10:48:24 2019 +0000

    Polish. Align with 7.0.x/9.0.x. Use i18n.
---
 java/org/apache/tomcat/util/buf/LocalStrings.properties | 2 ++
 java/org/apache/tomcat/util/buf/MessageBytes.java       | 2 +-
 java/org/apache/tomcat/util/buf/UDecoder.java           | 5 ++---
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/util/buf/LocalStrings.properties b/java/org/apache/tomcat/util/buf/LocalStrings.properties
index 226c041..8128109 100644
--- a/java/org/apache/tomcat/util/buf/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/buf/LocalStrings.properties
@@ -25,6 +25,8 @@ c2bConverter.recycleFailed=Failed to recycle the C2B Converter. Creating new Buf
 hexUtils.fromHex.nonHex=The input must consist only of hex digits
 hexUtils.fromHex.oddDigits=The input must consist of an even number of hex digits
 
+uDecoder.eof=End of file (EOF)
+uDecoder.noSlash=The encoded slash character is not allowed
 uDecoder.urlDecode.conversionError=Failed to decode [{0}] using character set [{1}]
 uDecoder.urlDecode.missingDigit=Failed to decode [{0}] because the % character must be followed by two hexademical digits
 uDecoder.urlDecode.uee=Unable to URL decode the specified input since the encoding [{0}] is not supported.
diff --git a/java/org/apache/tomcat/util/buf/MessageBytes.java b/java/org/apache/tomcat/util/buf/MessageBytes.java
index de4942f..a24ad82 100644
--- a/java/org/apache/tomcat/util/buf/MessageBytes.java
+++ b/java/org/apache/tomcat/util/buf/MessageBytes.java
@@ -499,7 +499,7 @@ public final class MessageBytes implements Cloneable, Serializable {
     private boolean hasLongValue=false;
 
     /**
-     * Set the buffer to the representation of an long.
+     * Set the buffer to the representation of a long.
      * @param l The long
      */
     public void setLong(long l) {
diff --git a/java/org/apache/tomcat/util/buf/UDecoder.java b/java/org/apache/tomcat/util/buf/UDecoder.java
index dda7ecb..fa0523a 100644
--- a/java/org/apache/tomcat/util/buf/UDecoder.java
+++ b/java/org/apache/tomcat/util/buf/UDecoder.java
@@ -59,7 +59,7 @@ public final class UDecoder {
     }
 
     /** Unexpected end of data. */
-    private static final IOException EXCEPTION_EOF = new DecodeException("EOF");
+    private static final IOException EXCEPTION_EOF = new DecodeException(sm.getString("uDecoder.eof"));
 
     /** %xx with not-hex digit */
     private static final IOException EXCEPTION_NOT_HEX_DIGIT = new DecodeException(
@@ -129,7 +129,6 @@ public final class UDecoder {
 
         mb.setEnd( idx );
 
-        return;
     }
 
     // -------------------- Additional methods --------------------
@@ -284,7 +283,7 @@ public final class UDecoder {
                 char res = (char) Integer.parseInt(
                         str.substring(strPos + 1, strPos + 3), 16);
                 if (noSlash && (res == '/')) {
-                    throw new IllegalArgumentException("noSlash");
+                    throw new IllegalArgumentException(sm.getString("uDecoder.noSlash"));
                 }
                 dec.append(res);
                 strPos += 3;


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