tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1237156 - in /tomcat/trunk/java/org/apache/coyote/http11: AbstractOutputBuffer.java InternalOutputBuffer.java
Date Sat, 28 Jan 2012 20:29:37 GMT
Author: markt
Date: Sat Jan 28 20:29:37 2012
New Revision: 1237156

URL: http://svn.apache.org/viewvc?rev=1237156&view=rev
Log:
Refactor to reduce duplicate code

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java
    tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java?rev=1237156&r1=1237155&r2=1237156&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractOutputBuffer.java Sat Jan 28 20:29:37
2012
@@ -258,18 +258,8 @@ public abstract class AbstractOutputBuff
      * connection.
      */
     public void recycle() {
-        // Recycle filters
-        for (int i = 0; i <= lastActiveFilter; i++) {
-            activeFilters[i].recycle();
-        }
-        // Recycle response object
-        response.recycle();
-        // Reset pointers
-        pos = 0;
-        lastActiveFilter = -1;
-        committed = false;
-        finished = false;
-        byteCount = 0;
+        // Sub-classes may wish to do more than this.
+        nextRequest();
     }
 
     /**

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java?rev=1237156&r1=1237155&r2=1237156&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java Sat Jan 28 20:29:37
2012
@@ -129,7 +129,6 @@ public class InternalOutputBuffer extend
     @Override
     public void recycle() {
         super.recycle();
-        socketBuffer.recycle();
         outputStream = null;
     }
 



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


Mime
View raw message