Author: markt Date: Tue Mar 25 16:19:15 2008 New Revision: 641073 URL: http://svn.apache.org/viewvc?rev=641073&view=rev Log: Code clean-up. Remove unused code. Fix generics related warnings. No functional change.
Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=641073&r1=641072&r2=641073&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Tue Mar 25 16:19:15 2008 @@ -81,30 +81,12 @@ /** - * 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 @@ /** * List of encoders. */ - protected HashMap encoders = new HashMap(); + protected HashMap<String,B2CConverter> encoders = + new HashMap<String,B2CConverter>(); /** @@ -211,8 +194,6 @@ 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 @@ 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<B2CConverter>(){ - public Object run() throws IOException{ + public B2CConverter run() throws IOException { return new B2CConverter(enc); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]