Author: markt Date: Thu May 4 19:28:26 2017 New Revision: 1793860 URL: http://svn.apache.org/viewvc?rev=1793860&view=rev Log: Remove deprecated code
Modified: tomcat/trunk/java/org/apache/coyote/Constants.java tomcat/trunk/java/org/apache/coyote/Request.java tomcat/trunk/java/org/apache/coyote/Response.java Modified: tomcat/trunk/java/org/apache/coyote/Constants.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Constants.java?rev=1793860&r1=1793859&r2=1793860&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/Constants.java (original) +++ tomcat/trunk/java/org/apache/coyote/Constants.java Thu May 4 19:28:26 2017 @@ -26,12 +26,6 @@ import java.nio.charset.StandardCharsets */ public final class Constants { - /** - * @deprecated This will be removed in Tomcat 9.0.x onwards. - */ - @Deprecated - public static final String DEFAULT_CHARACTER_ENCODING="ISO-8859-1"; - public static final Charset DEFAULT_URI_CHARSET = StandardCharsets.UTF_8; public static final Charset DEFAULT_BODY_CHARSET = StandardCharsets.ISO_8859_1; Modified: tomcat/trunk/java/org/apache/coyote/Request.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Request.java?rev=1793860&r1=1793859&r2=1793860&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/Request.java (original) +++ tomcat/trunk/java/org/apache/coyote/Request.java Thu May 4 19:28:26 2017 @@ -284,32 +284,13 @@ public final class Request { this.localPort = port; } - // -------------------- encoding/type -------------------- - - - /** - * Get the character encoding used for this request. - * - * @return The value set via {@link #setCharacterEncoding(String)} or if no - * call has been made to that method try to obtain if from the - * content type. - * - * @deprecated This method will be removed in Tomcat 9.0.x - */ - @Deprecated - public String getCharacterEncoding() { - Charset charset = getCharset(); - if (charset == null) { - return null; - } - return charset.name(); - } + // -------------------- encoding/type -------------------- /** * Get the character encoding used for this request. * - * @return The value set via {@link #setCharacterEncoding(String)} or if no + * @return The value set via {@link #setCharset(Charset)} or if no * call has been made to that method try to obtain if from the * content type. */ @@ -324,23 +305,11 @@ public final class Request { } - /** - * @param enc The new encoding - * - * @throws UnsupportedEncodingException If the encoding is invalid - * - * @deprecated This method will be removed in Tomcat 9.0.x - */ - @Deprecated - public void setCharacterEncoding(String enc) throws UnsupportedEncodingException { - setCharset(B2CConverter.getCharset(enc)); - } - - public void setCharset(Charset charset) { this.charset = charset; } + public void setContentLength(long len) { this.contentLength = len; } Modified: tomcat/trunk/java/org/apache/coyote/Response.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Response.java?rev=1793860&r1=1793859&r2=1793860&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/Response.java (original) +++ tomcat/trunk/java/org/apache/coyote/Response.java Thu May 4 19:28:26 2017 @@ -395,28 +395,6 @@ public final class Response { return contentLanguage; } - /** - * Overrides the name of the character encoding used in the body - * of the response. This method must be called prior to writing output - * using getWriter(). - * - * @param charset String containing the name of the character encoding. - * - * @deprecated This method will be removed in Tomcat 9.0.x - */ - @Deprecated - public void setCharacterEncoding(String charset) { - if (charset == null) { - return; - } - - try { - setCharset(B2CConverter.getCharset(charset)); - } catch (UnsupportedEncodingException e) { - log.warn(sm.getString("response.encoding.invalid", charset), e); - } - } - /** * Overrides the character encoding used in the body of the response. This @@ -437,21 +415,6 @@ public final class Response { } - /** - * @return The name of the current encoding - * - * @deprecated This method will be removed in Tomcat 9.0.x - */ - @Deprecated - public String getCharacterEncoding() { - Charset charset = getCharset(); - if (charset == null) { - return null; - } - return charset.name(); - } - - public Charset getCharset() { return charset; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org