hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r735808 - in /httpcomponents/httpcore/trunk: ./ module-nio/src/main/java/org/apache/http/impl/nio/
Date Mon, 19 Jan 2009 20:57:37 GMT
Author: olegk
Date: Mon Jan 19 12:57:37 2009
New Revision: 735808

URL: http://svn.apache.org/viewvc?rev=735808&view=rev
Log:
HTTPCORE-180: Fixed NPE in standard I/O event dispatchers when IOEventDispatch#disconnected
fires before the session was fully initialized (IOEventDispatch#connected was not called)

Modified:
    httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultClientIOEventDispatch.java
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultServerIOEventDispatch.java
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java

Modified: httpcomponents/httpcore/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/RELEASE_NOTES.txt?rev=735808&r1=735807&r2=735808&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpcore/trunk/RELEASE_NOTES.txt Mon Jan 19 12:57:37 2009
@@ -1,6 +1,11 @@
 Changes since 4.0 Beta 3
 -------------------
 
+* [HTTPCORE-180] Fixed NPE in standard I/O event dispatchers when 
+  IOEventDispatch#disconnected fires before the session was fully initialized 
+  (IOEventDispatch#connected was not called).
+  Contributed by Oleg Kalnichevski <olegk at apache.org> 
+
 * [HTTPCORE-175] Chunk decoders no longer accept truncated chunks as valid input.
   Contributed by Oleg Kalnichevski <olegk at apache.org> 
 

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultClientIOEventDispatch.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultClientIOEventDispatch.java?rev=735808&r1=735807&r2=735808&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultClientIOEventDispatch.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultClientIOEventDispatch.java
Mon Jan 19 12:57:37 2009
@@ -90,7 +90,9 @@
     public void disconnected(final IOSession session) {
         NHttpClientIOTarget conn = 
             (NHttpClientIOTarget) session.getAttribute(NHTTP_CONN);
-        this.handler.closed(conn);
+        if (conn != null) {
+            this.handler.closed(conn);
+        }
     }
 
     public void inputReady(final IOSession session) {

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultServerIOEventDispatch.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultServerIOEventDispatch.java?rev=735808&r1=735807&r2=735808&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultServerIOEventDispatch.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/DefaultServerIOEventDispatch.java
Mon Jan 19 12:57:37 2009
@@ -89,7 +89,9 @@
     public void disconnected(final IOSession session) {
         NHttpServerIOTarget conn = 
             (NHttpServerIOTarget) session.getAttribute(NHTTP_CONN);
-        this.handler.closed(conn);
+        if (conn != null) {
+            this.handler.closed(conn);
+        }
     }
 
     public void inputReady(final IOSession session) {

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java?rev=735808&r1=735807&r2=735808&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLClientIOEventDispatch.java
Mon Jan 19 12:57:37 2009
@@ -137,8 +137,9 @@
     public void disconnected(final IOSession session) {
         NHttpClientIOTarget conn = 
             (NHttpClientIOTarget) session.getAttribute(NHTTP_CONN);
-        
-        this.handler.closed(conn);
+        if (conn != null) {
+            this.handler.closed(conn);
+        }
     }
 
     public void inputReady(final IOSession session) {

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java?rev=735808&r1=735807&r2=735808&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/SSLServerIOEventDispatch.java
Mon Jan 19 12:57:37 2009
@@ -137,7 +137,9 @@
         NHttpServerIOTarget conn = 
             (NHttpServerIOTarget) session.getAttribute(NHTTP_CONN);
 
-        this.handler.closed(conn);
+        if (conn != null) {
+            this.handler.closed(conn);
+        }
     }
 
     public void inputReady(final IOSession session) {



Mime
View raw message