hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1698184 - /httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java
Date Thu, 27 Aug 2015 15:26:32 GMT
Author: ggregory
Date: Thu Aug 27 15:26:32 2015
New Revision: 1698184

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

Modified:
    httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java

Modified: httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java?rev=1698184&r1=1698183&r2=1698184&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/memcached/MemcachedHttpCacheStorage.java
Thu Aug 27 15:26:32 2015
@@ -253,15 +253,14 @@ public class MemcachedHttpCacheStorage i
                     putEntry(url, updatedEntry);
                     return;
 
+                }
+                final byte[] updatedBytes = serializeEntry(url, updatedEntry);
+                final CASResponse casResult = client.cas(key, v.getCas(),
+                        updatedBytes);
+                if (casResult != CASResponse.OK) {
+                    numRetries++;
                 } else {
-                    final byte[] updatedBytes = serializeEntry(url, updatedEntry);
-                    final CASResponse casResult = client.cas(key, v.getCas(),
-                            updatedBytes);
-                    if (casResult != CASResponse.OK) {
-                        numRetries++;
-                    } else {
-                        return;
-                    }
+                    return;
                 }
             } catch (final OperationTimeoutException ex) {
                 throw new MemcachedOperationTimeoutException(ex);



Mime
View raw message