From 69b509a06df9d23b170a77e506ea521a57fbf92f Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Wed, 27 Jan 2016 08:25:11 +0000 Subject: [PATCH] Statement unnecessarily nested within else clause. git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1726954 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/hc/client5/http/impl/sync/MinimalClientExec.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java index 4b9962a4c..fe33dc549 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java @@ -145,9 +145,8 @@ public class MinimalClientExec implements ClientExecChain { 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 implements ClientExecChain { // 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");