hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1726954 - /httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java
Date Wed, 27 Jan 2016 08:25:11 GMT
Author: ggregory
Date: Wed Jan 27 08:25:11 2016
New Revision: 1726954

URL: http://svn.apache.org/viewvc?rev=1726954&view=rev
Log:
Statement unnecessarily nested within else clause.

Modified:
    httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java

Modified: httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java?rev=1726954&r1=1726953&r2=1726954&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java
Wed Jan 27 08:25:11 2016
@@ -145,9 +145,8 @@ public class MinimalClientExec implement
             if (execAware.isAborted()) {
                 connRequest.cancel();
                 throw new RequestAbortedException("Request aborted");
-            } else {
-                execAware.setCancellable(connRequest);
             }
+            execAware.setCancellable(connRequest);
         }
 
         final RequestConfig config = context.getRequestConfig();
@@ -228,9 +227,8 @@ public class MinimalClientExec implement
                 // connection not needed and (assumed to be) in re-usable state
                 releaseTrigger.releaseConnection();
                 return new HttpResponseProxy(response, null);
-            } else {
-                return new HttpResponseProxy(response, releaseTrigger);
             }
+            return new HttpResponseProxy(response, releaseTrigger);
         } catch (final ConnectionShutdownException ex) {
             final InterruptedIOException ioex = new InterruptedIOException(
                     "Connection has been shut down");



Mime
View raw message