tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1022478 - /tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
Date Thu, 14 Oct 2010 12:11:51 GMT
Author: markt
Date: Thu Oct 14 12:11:51 2010
New Revision: 1022478

URL: http://svn.apache.org/viewvc?rev=1022478&view=rev
Log:
Avoid NPE triggered when running TCK tests

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java?rev=1022478&r1=1022477&r2=1022478&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Thu Oct 14 12:11:51
2010
@@ -144,8 +144,10 @@ public class InternalNioOutputBuffer ext
     @Override
     public void recycle() {
         super.recycle();
-        socket.getBufHandler().getWriteBuffer().clear();
-        socket = null;
+        if (socket != null) {
+            socket.getBufHandler().getWriteBuffer().clear();
+            socket = null;
+        }
         lastWrite.set(1);
     }
 



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


Mime
View raw message