[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpcomponents-commits
Subject:    svn commit: r634790 -
From:       olegk () apache ! org
Date:       2008-03-07 19:52:50
Message-ID: 20080307195251.52BF81A9832 () eris ! apache ! org
[Download RAW message or body]

Author: olegk
Date: Fri Mar  7 11:52:49 2008
New Revision: 634790

URL: http://svn.apache.org/viewvc?rev=634790&view=rev
Log:
Added missing check for request entity being non null

Modified:
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpClientHandler.java


Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpClientHandler.java
                
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/ja \
va/org/apache/http/nio/protocol/AsyncNHttpClientHandler.java?rev=634790&r1=634789&r2=634790&view=diff
 ==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpClientHandler.java \
                (original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpClientHandler.java \
Fri Mar  7 11:52:49 2008 @@ -150,10 +150,12 @@
             if (request instanceof HttpEntityEnclosingRequest) {
                 HttpEntityEnclosingRequest entityReq = (HttpEntityEnclosingRequest) \
request;  HttpEntity entity = entityReq.getEntity();
-                if (entity instanceof ProducingNHttpEntity) {
-                    connState.setProducingEntity((ProducingNHttpEntity) entity);
-                } else {
-                    connState.setProducingEntity(new NHttpEntityWrapper(entity));
+                if (entity != null) {
+                    if (entity instanceof ProducingNHttpEntity) {
+                        connState.setProducingEntity((ProducingNHttpEntity) entity);
+                    } else {
+                        connState.setProducingEntity(new \
NHttpEntityWrapper(entity)); +                    }
                 }
 
                 if (entityReq.expectContinue()) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic