You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2010/12/07 15:22:21 UTC

svn commit: r1043059 - /httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncRequestProducer.java

Author: olegk
Date: Tue Dec  7 14:22:21 2010
New Revision: 1043059

URL: http://svn.apache.org/viewvc?rev=1043059&view=rev
Log:
Code cleanups

Modified:
    httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncRequestProducer.java

Modified: httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncRequestProducer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncRequestProducer.java?rev=1043059&r1=1043058&r2=1043059&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncRequestProducer.java (original)
+++ httpcomponents/httpasyncclient/trunk/src/main/java/org/apache/http/impl/nio/client/BasicHttpAsyncRequestProducer.java Tue Dec  7 14:22:21 2010
@@ -67,11 +67,9 @@ public class BasicHttpAsyncRequestProduc
 
     protected ProducingNHttpEntity createProducingHttpEntity(
             final HttpRequest request) throws IOException {
-        HttpEntityEnclosingRequest entityReq;
         HttpEntity entity = null;
         if (request instanceof HttpEntityEnclosingRequest) {
-            entityReq = (HttpEntityEnclosingRequest) request;
-            entity = entityReq.getEntity();
+            entity = ((HttpEntityEnclosingRequest) request).getEntity();
         }
         if (entity != null) {
             if (entity instanceof ProducingNHttpEntity) {
@@ -102,7 +100,7 @@ public class BasicHttpAsyncRequestProduc
 
     public synchronized boolean isRepeatable() {
         if (this.request instanceof HttpEntityEnclosingRequest) {
-            HttpEntity entity = ((HttpEntityEnclosingRequest) request).getEntity();
+            HttpEntity entity = ((HttpEntityEnclosingRequest) this.request).getEntity();
             if (entity != null) {
                 return entity.isRepeatable();
             } else {