hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1698025 - in /httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main: java-deprecated/org/apache/http/impl/nio/client/ java-deprecated/org/apache/http/impl/nio/conn/ java-deprecated/org/apache/http/nio/conn/scheme/ java/org/apache/h...
Date Wed, 26 Aug 2015 22:20:41 GMT
Author: ggregory
Date: Wed Aug 26 22:20:41 2015
New Revision: 1698025

URL: http://svn.apache.org/r1698025
Log:
Statement unnecessarily nested within else clause.

Modified:
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/nio/conn/scheme/AsyncScheme.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/CPoolProxy.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedNHttpClientConnectionImpl.java

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java?rev=1698025&r1=1698024&r2=1698025&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
Wed Aug 26 22:20:41 2015
@@ -689,9 +689,8 @@ class DefaultAsyncRequestDirector<T> imp
     private RequestWrapper wrapRequest(final HttpRequest request) throws ProtocolException
{
         if (request instanceof HttpEntityEnclosingRequest) {
             return new EntityEnclosingRequestWrapper((HttpEntityEnclosingRequest) request);
-        } else {
-            return new RequestWrapper(request);
         }
+        return new RequestWrapper(request);
     }
 
     protected void rewriteRequestURI(
@@ -854,9 +853,8 @@ class DefaultAsyncRequestDirector<T> imp
                     this.targetAuthStrategy, this.targetAuthState, this.localContext)) {
                 // Re-try the same request via the same route
                 return this.mainRequest;
-            } else {
-                return null;
             }
+            return null;
         }
         return null;
     }
@@ -871,9 +869,8 @@ class DefaultAsyncRequestDirector<T> imp
                     this.proxyAuthStrategy, this.proxyAuthState, this.localContext)) {
                 // Re-try the same request via the same route
                 return this.mainRequest;
-            } else {
-                return null;
             }
+            return null;
         }
         return null;
     }

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java?rev=1698025&r1=1698024&r2=1698025&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/impl/nio/conn/ManagedClientAsyncConnectionImpl.java
Wed Aug 26 22:20:41 2015
@@ -136,9 +136,8 @@ class ManagedClientAsyncConnectionImpl i
         final ClientAsyncConnection conn = getConnection();
         if (conn != null) {
             return conn.isOpen();
-        } else {
-            return false;
         }
+        return false;
     }
 
     @Override
@@ -278,9 +277,8 @@ class ManagedClientAsyncConnectionImpl i
         final IOSession iosession = conn.getIOSession();
         if (iosession instanceof SSLIOSession) {
             return ((SSLIOSession) iosession).getSSLSession();
-        } else {
-            return null;
         }
+        return null;
     }
 
     @Override
@@ -447,9 +445,8 @@ class ManagedClientAsyncConnectionImpl i
     public synchronized String toString() {
         if (this.poolEntry != null) {
             return this.poolEntry.toString();
-        } else {
-            return "released";
         }
+        return "released";
     }
 
 }

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/nio/conn/scheme/AsyncScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/nio/conn/scheme/AsyncScheme.java?rev=1698025&r1=1698024&r2=1698025&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/nio/conn/scheme/AsyncScheme.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java-deprecated/org/apache/http/nio/conn/scheme/AsyncScheme.java
Wed Aug 26 22:20:41 2015
@@ -99,9 +99,8 @@ public final class AsyncScheme {
             return this.name.equals(that.name)
                 && this.defaultPort == that.defaultPort
                 && this.strategy.equals(that.strategy);
-        } else {
-            return false;
         }
+        return false;
     }
 
     @Override

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/CPoolProxy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/CPoolProxy.java?rev=1698025&r1=1698024&r2=1698025&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/CPoolProxy.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/CPoolProxy.java
Wed Aug 26 22:20:41 2015
@@ -156,9 +156,8 @@ class CPoolProxy implements ManagedNHttp
         final CPoolEntry local = this.poolEntry;
         if (local != null) {
             return !local.isClosed();
-        } else {
-            return false;
         }
+        return false;
     }
 
     @Override
@@ -166,9 +165,8 @@ class CPoolProxy implements ManagedNHttp
         final NHttpClientConnection conn = getConnection();
         if (conn != null) {
             return !conn.isOpen();
-        } else {
-            return false;
         }
+        return false;
     }
 
     @Override

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedNHttpClientConnectionImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedNHttpClientConnectionImpl.java?rev=1698025&r1=1698024&r2=1698025&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedNHttpClientConnectionImpl.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/ManagedNHttpClientConnectionImpl.java
Wed Aug 26 22:20:41 2015
@@ -109,9 +109,8 @@ class ManagedNHttpClientConnectionImpl
     public SSLSession getSSLSession() {
         if (this.original instanceof SSLIOSession) {
             return ((SSLIOSession) this.original).getSSLSession();
-        } else {
-            return null;
         }
+        return null;
     }
 
     @Override



Mime
View raw message