From 152ba4736f8d350beef938c763865a1cfb84b9bc Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Tue, 3 Oct 2023 15:52:00 +0200 Subject: [PATCH] Renamed cache protocol conformance response interceptor (no functional changes) --- .../http/impl/cache/CachingH2AsyncClientBuilder.java | 2 +- .../http/impl/cache/CachingHttpAsyncClientBuilder.java | 2 +- .../client5/http/impl/cache/CachingHttpClientBuilder.java | 2 +- ...rotocolCompliance.java => ResponseCacheConformance.java} | 4 ++-- ...colCompliance.java => TestResponseCacheConformance.java} | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) rename httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/{ResponseProtocolCompliance.java => ResponseCacheConformance.java} (94%) rename httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/{TestResponseProtocolCompliance.java => TestResponseCacheConformance.java} (96%) diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingH2AsyncClientBuilder.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingH2AsyncClientBuilder.java index aff56365f..2d1567c07 100644 --- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingH2AsyncClientBuilder.java +++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingH2AsyncClientBuilder.java @@ -65,7 +65,7 @@ public class CachingH2AsyncClientBuilder extends H2AsyncClientBuilder { protected CachingH2AsyncClientBuilder() { super(); - addResponseInterceptorFirst(ResponseProtocolCompliance.INSTANCE); + addResponseInterceptorFirst(ResponseCacheConformance.INSTANCE); addResponseInterceptorLast(ResponseViaCache.INSTANCE); addRequestInterceptorLast(RequestViaCache.INSTANCE); this.deleteCache = true; diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttpAsyncClientBuilder.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttpAsyncClientBuilder.java index 2f31f030f..ab6249db9 100644 --- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttpAsyncClientBuilder.java +++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttpAsyncClientBuilder.java @@ -65,7 +65,7 @@ public class CachingHttpAsyncClientBuilder extends HttpAsyncClientBuilder { protected CachingHttpAsyncClientBuilder() { super(); - addResponseInterceptorFirst(ResponseProtocolCompliance.INSTANCE); + addResponseInterceptorFirst(ResponseCacheConformance.INSTANCE); addResponseInterceptorLast(ResponseViaCache.INSTANCE); addRequestInterceptorLast(RequestViaCache.INSTANCE); this.deleteCache = true; diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttpClientBuilder.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttpClientBuilder.java index 56634d4f0..b12485895 100644 --- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttpClientBuilder.java +++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingHttpClientBuilder.java @@ -61,7 +61,7 @@ public class CachingHttpClientBuilder extends HttpClientBuilder { protected CachingHttpClientBuilder() { super(); - addResponseInterceptorFirst(ResponseProtocolCompliance.INSTANCE); + addResponseInterceptorFirst(ResponseCacheConformance.INSTANCE); addResponseInterceptorLast(ResponseViaCache.INSTANCE); addRequestInterceptorLast(RequestViaCache.INSTANCE); this.deleteCache = true; diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseProtocolCompliance.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseCacheConformance.java similarity index 94% rename from httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseProtocolCompliance.java rename to httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseCacheConformance.java index 79fa549cf..87ef6857e 100644 --- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseProtocolCompliance.java +++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseCacheConformance.java @@ -48,9 +48,9 @@ import org.apache.hc.core5.http.protocol.HttpContext; * header if it is not present in the response message.. */ @Contract(threading = ThreadingBehavior.IMMUTABLE) -class ResponseProtocolCompliance implements HttpResponseInterceptor { +class ResponseCacheConformance implements HttpResponseInterceptor { - public static final ResponseProtocolCompliance INSTANCE = new ResponseProtocolCompliance(); + public static final ResponseCacheConformance INSTANCE = new ResponseCacheConformance(); private final static String[] DISALLOWED_ENTITY_HEADERS = { HttpHeaders.CONTENT_ENCODING, diff --git a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestResponseProtocolCompliance.java b/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestResponseCacheConformance.java similarity index 96% rename from httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestResponseProtocolCompliance.java rename to httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestResponseCacheConformance.java index 4ca1003c1..c35247898 100644 --- a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestResponseProtocolCompliance.java +++ b/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/TestResponseCacheConformance.java @@ -37,13 +37,13 @@ import org.apache.hc.core5.http.support.BasicResponseBuilder; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -public class TestResponseProtocolCompliance { +public class TestResponseCacheConformance { - private ResponseProtocolCompliance impl; + private ResponseCacheConformance impl; @BeforeEach public void setUp() { - impl = ResponseProtocolCompliance.INSTANCE; + impl = ResponseCacheConformance.INSTANCE; } private void shouldStripEntityHeaderFromOrigin304ResponseToStrongValidation(