From c1b90cf7732b49bc965565b74d7c00a8e63efa8b Mon Sep 17 00:00:00 2001 From: markt Date: Tue, 25 Mar 2008 23:19:15 +0000 Subject: [PATCH] Code clean-up. Remove unused code. Fix generics related warnings. No functional change. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@641073 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/catalina/connector/InputBuffer.java | 31 +++++----------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/java/org/apache/catalina/connector/InputBuffer.java b/java/org/apache/catalina/connector/InputBuffer.java index 7eebefb43..ed762ca90 100644 --- a/java/org/apache/catalina/connector/InputBuffer.java +++ b/java/org/apache/catalina/connector/InputBuffer.java @@ -81,30 +81,12 @@ public class InputBuffer extends Reader /** - * Number of bytes read. - */ - private int bytesRead = 0; - - - /** - * Number of chars read. - */ - private int charsRead = 0; - - - /** * Flag which indicates if the input buffer is closed. */ private boolean closed = false; /** - * Byte chunk used to input bytes. - */ - private ByteChunk inputChunk = new ByteChunk(); - - - /** * Encoding to use. */ private String enc; @@ -119,7 +101,8 @@ public class InputBuffer extends Reader /** * List of encoders. */ - protected HashMap encoders = new HashMap(); + protected HashMap encoders = + new HashMap(); /** @@ -211,8 +194,6 @@ public class InputBuffer extends Reader public void recycle() { state = INITIAL_STATE; - bytesRead = 0; - charsRead = 0; // If usage of mark made the buffer too big, reallocate it if (cb.getChars().length > size) { @@ -481,14 +462,14 @@ public class InputBuffer extends Reader gotEnc = true; if (enc == null) enc = DEFAULT_ENCODING; - conv = (B2CConverter) encoders.get(enc); + conv = encoders.get(enc); if (conv == null) { if (SecurityUtil.isPackageProtectionEnabled()){ try{ - conv = (B2CConverter)AccessController.doPrivileged( - new PrivilegedExceptionAction(){ + conv = AccessController.doPrivileged( + new PrivilegedExceptionAction(){ - public Object run() throws IOException{ + public B2CConverter run() throws IOException { return new B2CConverter(enc); } -- 2.11.0