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

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

commit 763cc04f7d1c16c611b02b8e3ec8436339145d0a
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Mar 16 16:23:15 2020 +0000

    Deprecate unused methods
---
 java/org/apache/tomcat/util/buf/UDecoder.java | 29 +++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/util/buf/UDecoder.java 
b/java/org/apache/tomcat/util/buf/UDecoder.java
index 3e063c1..f37aa73 100644
--- a/java/org/apache/tomcat/util/buf/UDecoder.java
+++ b/java/org/apache/tomcat/util/buf/UDecoder.java
@@ -69,7 +69,9 @@ public final class UDecoder {
     }
 
     /**
-     * URLDecode, will modify the source.
+     * URLDecode, will modify the source. Assumes source bytes are encoded 
using
+     * a superset of US-ASCII as per RFC 7230.
+     *
      * @param mb The URL encoded bytes
      * @param query <code>true</code> if this is a query string
      * @throws IOException Invalid %xx URL encoding
@@ -126,14 +128,19 @@ public final class UDecoder {
     }
 
     // -------------------- Additional methods --------------------
-    // XXX What do we do about charset ????
 
     /**
      * In-buffer processing - the buffer will be modified.
+     * <p>
+     * <b>WARNING:</b> This method assumes US-ASCII encoding.
+     *
      * @param mb The URL encoded chars
      * @param query <code>true</code> if this is a query string
      * @throws IOException Invalid %xx URL encoding
+     *
+     * @deprecated Unused. Will be removed in Tomcat 10
      */
+    @Deprecated
     public void convert( CharChunk mb, boolean query )
         throws IOException
     {
@@ -187,11 +194,17 @@ public final class UDecoder {
     }
 
     /**
-     * URLDecode, will modify the source
+     * URLDecode, will modify the source.
+     * <p>
+     * <b>WARNING:</b> This method assumes US-ASCII encoding.
+     *
      * @param mb The URL encoded String, bytes or chars
      * @param query <code>true</code> if this is a query string
      * @throws IOException Invalid %xx URL encoding
+     *
+     * @deprecated Unused. Will be removed in Tomcat 10
      */
+    @Deprecated
     public void convert(MessageBytes mb, boolean query)
         throws IOException
     {
@@ -220,11 +233,19 @@ public final class UDecoder {
     }
 
     /**
-     * %xx decoding of a string. FIXME: this is inefficient.
+     * %xx decoding of a string.
+     * <p>
+     * <b>WARNING:</b> This method assumes US-ASCII encoding.
+     * <p>
+     * FIXME: this is inefficient.
+     *
      * @param str The URL encoded string
      * @param query <code>true</code> if this is a query string
      * @return the decoded string
+     *
+     * @deprecated Unused. Will be removed in Tomcat 10
      */
+    @Deprecated
     public final String convert(String str, boolean query)
     {
         if (str == null) {


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

Reply via email to