hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject httpcomponents-client git commit: Better method name (no functional changes)
Date Sun, 07 Jan 2018 13:08:34 GMT
Repository: httpcomponents-client
Updated Branches:
  refs/heads/master 7cf4240b3 -> f16ac3ec3


Better method name (no functional changes)


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/commit/f16ac3ec
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/tree/f16ac3ec
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/diff/f16ac3ec

Branch: refs/heads/master
Commit: f16ac3ec3b411d1f6a7eb8ade2440843f33df5e0
Parents: 7cf4240
Author: Oleg Kalnichevski <olegk@apache.org>
Authored: Sun Jan 7 13:59:28 2018 +0100
Committer: Oleg Kalnichevski <olegk@apache.org>
Committed: Sun Jan 7 13:59:28 2018 +0100

----------------------------------------------------------------------
 .../hc/client5/http/impl/cache/BasicHttpAsyncCache.java |  2 +-
 .../hc/client5/http/impl/cache/BasicHttpCache.java      |  2 +-
 .../hc/client5/http/impl/cache/CacheKeyGenerator.java   |  2 +-
 .../http/impl/cache/DefaultAsyncCacheRevalidator.java   |  2 +-
 .../http/impl/cache/DefaultCacheRevalidator.java        |  2 +-
 .../client5/http/impl/cache/TestCacheKeyGenerator.java  | 12 ++++++------
 6 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/f16ac3ec/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/BasicHttpAsyncCache.java
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/BasicHttpAsyncCache.java
b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/BasicHttpAsyncCache.java
index 199fb64..945da46 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/BasicHttpAsyncCache.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/BasicHttpAsyncCache.java
@@ -197,7 +197,7 @@ class BasicHttpAsyncCache implements HttpAsyncCache {
             final HttpCacheEntry entry,
             final FutureCallback<Boolean> callback) {
         final String variantKey = cacheKeyGenerator.generateVariantKey(req, entry);
-        final String variantCacheKey = cacheKeyGenerator.generateVariantURI(host, req, entry);
+        final String variantCacheKey = cacheKeyGenerator.generateKey(host, req, entry);
         return storage.putEntry(variantCacheKey, entry, new FutureCallback<Boolean>()
{
 
             @Override

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/f16ac3ec/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/BasicHttpCache.java
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/BasicHttpCache.java
b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/BasicHttpCache.java
index 6d908fe..2cfdcb4 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/BasicHttpCache.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/BasicHttpCache.java
@@ -151,7 +151,7 @@ class BasicHttpCache implements HttpCache {
             final HttpRequest req,
             final HttpCacheEntry entry) {
         final String variantKey = cacheKeyGenerator.generateVariantKey(req, entry);
-        final String variantCacheKey = cacheKeyGenerator.generateVariantURI(host, req, entry);
+        final String variantCacheKey = cacheKeyGenerator.generateKey(host, req, entry);
         storeEntry(variantCacheKey, entry);
         try {
             storage.updateEntry(cacheKey, new HttpCacheCASOperation() {

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/f16ac3ec/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CacheKeyGenerator.java
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CacheKeyGenerator.java
b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CacheKeyGenerator.java
index a3eb5fe..2ea3e1f 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CacheKeyGenerator.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CacheKeyGenerator.java
@@ -119,7 +119,7 @@ public class CacheKeyGenerator implements Resolver<URI, String>
{
      * @param entry the parent entry used to track the variants
      * @return cache key
      */
-    public String generateVariantURI(final HttpHost host, final HttpRequest request, final
HttpCacheEntry entry) {
+    public String generateKey(final HttpHost host, final HttpRequest request, final HttpCacheEntry
entry) {
         if (!entry.hasVariants()) {
             return generateKey(host, request);
         }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/f16ac3ec/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultAsyncCacheRevalidator.java
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultAsyncCacheRevalidator.java
b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultAsyncCacheRevalidator.java
index f0bed25..6324124 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultAsyncCacheRevalidator.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultAsyncCacheRevalidator.java
@@ -146,7 +146,7 @@ class DefaultAsyncCacheRevalidator extends CacheRevalidatorBase {
             final AsyncExecChain chain,
             final AsyncExecCallback asyncExecCallback,
             final HttpCacheEntry entry) {
-        final String cacheKey = cacheKeyGenerator.generateVariantURI(target, request, entry);
+        final String cacheKey = cacheKeyGenerator.generateKey(target, request, entry);
         scheduleRevalidation(cacheKey, new Runnable() {
 
                         @Override

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/f16ac3ec/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultCacheRevalidator.java
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultCacheRevalidator.java
b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultCacheRevalidator.java
index 8c752b8..f033b86 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultCacheRevalidator.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultCacheRevalidator.java
@@ -81,7 +81,7 @@ class DefaultCacheRevalidator extends CacheRevalidatorBase {
             final ExecChain.Scope scope,
             final ExecChain chain,
             final HttpCacheEntry entry) {
-        final String cacheKey = cacheKeyGenerator.generateVariantURI(target, request, entry);
+        final String cacheKey = cacheKeyGenerator.generateKey(target, request, entry);
         scheduleRevalidation(cacheKey, new Runnable() {
 
                         @Override

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/f16ac3ec/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestCacheKeyGenerator.java
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestCacheKeyGenerator.java
b/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestCacheKeyGenerator.java
index 0713e10..e1b9256 100644
--- a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestCacheKeyGenerator.java
+++ b/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestCacheKeyGenerator.java
@@ -127,7 +127,7 @@ public class TestCacheKeyGenerator {
             }
         };
 
-        final String result = extractor.generateVariantURI(defaultHost, mockRequest, mockEntry);
+        final String result = extractor.generateKey(defaultHost, mockRequest, mockEntry);
         verify(mockEntry).hasVariants();
         Assert.assertSame(theURI, result);
     }
@@ -150,7 +150,7 @@ public class TestCacheKeyGenerator {
         when(mockEntry.headerIterator("Vary")).thenReturn(new BasicHeaderIterator(varyHeaders,
"Vary"));
         when(mockRequest.getHeaders("Accept-Encoding")).thenReturn(encHeaders);
 
-        final String result = extractor.generateVariantURI(defaultHost, mockRequest, mockEntry);
+        final String result = extractor.generateKey(defaultHost, mockRequest, mockEntry);
 
         verify(mockEntry).hasVariants();
         verify(mockEntry).headerIterator("Vary");
@@ -176,7 +176,7 @@ public class TestCacheKeyGenerator {
         when(mockRequest.getHeaders("Accept-Encoding"))
                 .thenReturn(noHeaders);
 
-        final String result = extractor.generateVariantURI(defaultHost, mockRequest, mockEntry);
+        final String result = extractor.generateKey(defaultHost, mockRequest, mockEntry);
 
         verify(mockEntry).hasVariants();
         verify(mockEntry).headerIterator("Vary");
@@ -203,7 +203,7 @@ public class TestCacheKeyGenerator {
         when(mockRequest.getHeaders("Accept-Encoding")).thenReturn(encHeaders);
         when(mockRequest.getHeaders("User-Agent")).thenReturn(uaHeaders);
 
-        final String result = extractor.generateVariantURI(defaultHost, mockRequest, mockEntry);
+        final String result = extractor.generateKey(defaultHost, mockRequest, mockEntry);
 
         verify(mockEntry).hasVariants();
         verify(mockEntry).headerIterator("Vary");
@@ -232,7 +232,7 @@ public class TestCacheKeyGenerator {
         when(mockRequest.getHeaders("Accept-Encoding")).thenReturn(encHeaders);
         when(mockRequest.getHeaders("User-Agent")).thenReturn(uaHeaders);
 
-        final String result = extractor.generateVariantURI(defaultHost, mockRequest, mockEntry);
+        final String result = extractor.generateKey(defaultHost, mockRequest, mockEntry);
 
         verify(mockEntry).hasVariants();
         verify(mockEntry).headerIterator("Vary");
@@ -261,7 +261,7 @@ public class TestCacheKeyGenerator {
         when(mockRequest.getHeaders("Accept-Encoding")).thenReturn(encHeaders);
         when(mockRequest.getHeaders("User-Agent")).thenReturn(uaHeaders);
 
-        final String result = extractor.generateVariantURI(defaultHost, mockRequest, mockEntry);
+        final String result = extractor.generateKey(defaultHost, mockRequest, mockEntry);
 
         verify(mockEntry).hasVariants();
         verify(mockEntry).headerIterator("Vary");


Mime
View raw message