tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r647307 - /tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
Date Fri, 11 Apr 2008 21:03:06 GMT
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


Mime
View raw message