You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2008/04/11 23:03:06 UTC

svn commit: r647307 - /tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java

Author: markt
Date: Fri Apr 11 14:02:41 2008
New Revision: 647307

URL: http://svn.apache.org/viewvc?rev=647307&view=rev
Log:
Fix for garbage test in bug 44494. Patch provided by Suzuki Yuichiro.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java?rev=647307&r1=647306&r2=647307&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java Fri Apr 11 14:02:41 2008
@@ -213,6 +213,14 @@
     /** Reset the buffer
      */
     public  final void recycle() {
+        try {
+            // Must clear super's buffer.
+            while (ready()) {
+                // InputStreamReader#skip(long) will allocate buffer to skip.
+                read();
+            }
+        } catch(IOException ioe){
+        }
     }
 }
 



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