Author: markt
Date: Thu May  4 20:22:39 2017
New Revision: 1793890

URL: http://svn.apache.org/viewvc?rev=1793890&view=rev
Log:
Remove deprecated code

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java?rev=1793890&r1=1793889&r2=1793890&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java Thu May  4 
20:22:39 2017
@@ -17,7 +17,6 @@
 package org.apache.tomcat.util.http;
 
 import java.io.IOException;
-import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
@@ -28,7 +27,6 @@ import java.util.Map;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
-import org.apache.tomcat.util.buf.B2CConverter;
 import org.apache.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.buf.MessageBytes;
 import org.apache.tomcat.util.buf.StringUtils;
@@ -84,30 +82,10 @@ public final class Parameters {
         this.limit = limit;
     }
 
-    /**
-     * @return The current encoding
-     *
-     * @deprecated This method will be removed in Tomcat 9.0.x
-     */
-    @Deprecated
-    public String getEncoding() {
-        return charset.name();
-    }
-
     public Charset getCharset() {
         return charset;
     }
 
-    /**
-     * @param s The new encoding
-     *
-     * @deprecated This method will be removed in Tomcat 9.0.x
-     */
-    @Deprecated
-    public void setEncoding(String s) {
-        setCharset(getCharset(s, DEFAULT_BODY_CHARSET));
-    }
-
     public void setCharset(Charset charset) {
         if (charset == null) {
             charset = DEFAULT_BODY_CHARSET;
@@ -118,16 +96,6 @@ public final class Parameters {
         }
     }
 
-    /**
-     * @param s The new query string encoding
-     *
-     * @deprecated This method will be removed in Tomcat 9
-     */
-    @Deprecated
-    public void setQueryStringEncoding(String s) {
-        setQueryStringCharset(getCharset(s, DEFAULT_URI_CHARSET));
-    }
-
     public void setQueryStringCharset(Charset queryStringCharset) {
         if (queryStringCharset == null) {
             queryStringCharset = DEFAULT_URI_CHARSET;
@@ -516,17 +484,6 @@ public final class Parameters {
         urlDec.convert(bc, true);
     }
 
-    /**
-     * @param data      Parameter data
-     * @param encoding  Encoding to use for encoded bytes
-     *
-     * @deprecated This method will be removed in Tomcat 9.0.x
-     */
-    @Deprecated
-    public void processParameters(MessageBytes data, String encoding) {
-        processParameters(data, getCharset(encoding, DEFAULT_BODY_CHARSET));
-    }
-
     public void processParameters(MessageBytes data, Charset charset) {
         if( data==null || data.isNull() || data.getLength() <= 0 ) {
             return;
@@ -539,17 +496,6 @@ public final class Parameters {
         processParameters(bc.getBytes(), bc.getOffset(), bc.getLength(), 
charset);
     }
 
-    private Charset getCharset(String encoding, Charset defaultCharset) {
-        if (encoding == null) {
-            return defaultCharset;
-        }
-        try {
-            return B2CConverter.getCharset(encoding);
-        } catch (UnsupportedEncodingException e) {
-            return defaultCharset;
-        }
-    }
-
     /**
      * Debug purpose
      */



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

Reply via email to