From 769e9fab3f83753661dc52e612bc1df29520be45 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sun, 5 Aug 2018 11:40:07 -0600 Subject: [PATCH] Add missing @Override annotations. --- .../hc/client5/http/cache/HttpAsyncCacheStorageAdaptor.java | 5 +++++ .../apache/hc/client5/testing/BasicTestAuthenticator.java | 1 + .../hc/client5/testing/async/TestHttp1AsyncRedirects.java | 1 + .../hc/client5/testing/sync/TestClientAuthentication.java | 1 + .../java/org/apache/hc/client5/http/impl/RequestCopier.java | 1 + .../hc/client5/http/impl/classic/ClassicRequestCopier.java | 1 + 6 files changed, 10 insertions(+) diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/cache/HttpAsyncCacheStorageAdaptor.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/cache/HttpAsyncCacheStorageAdaptor.java index 55bd095ff..baa849768 100644 --- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/cache/HttpAsyncCacheStorageAdaptor.java +++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/cache/HttpAsyncCacheStorageAdaptor.java @@ -48,6 +48,7 @@ public final class HttpAsyncCacheStorageAdaptor implements HttpAsyncCacheStorage this.cacheStorage = Args.notNull(cacheStorage, "Cache strorage"); } + @Override public Cancellable putEntry(final String key, final HttpCacheEntry entry, final FutureCallback callback) { Args.notEmpty(key, "Key"); Args.notNull(entry, "Cache ehtry"); @@ -61,6 +62,7 @@ public final class HttpAsyncCacheStorageAdaptor implements HttpAsyncCacheStorage return Operations.nonCancellable(); } + @Override public Cancellable getEntry(final String key, final FutureCallback callback) { Args.notEmpty(key, "Key"); Args.notNull(callback, "Callback"); @@ -73,6 +75,7 @@ public final class HttpAsyncCacheStorageAdaptor implements HttpAsyncCacheStorage return Operations.nonCancellable(); } + @Override public Cancellable removeEntry(final String key, final FutureCallback callback) { Args.notEmpty(key, "Key"); Args.notNull(callback, "Callback"); @@ -85,6 +88,7 @@ public final class HttpAsyncCacheStorageAdaptor implements HttpAsyncCacheStorage return Operations.nonCancellable(); } + @Override public Cancellable updateEntry( final String key, final HttpCacheCASOperation casOperation, final FutureCallback callback) { Args.notEmpty(key, "Key"); @@ -99,6 +103,7 @@ public final class HttpAsyncCacheStorageAdaptor implements HttpAsyncCacheStorage return Operations.nonCancellable(); } + @Override public Cancellable getEntries(final Collection keys, final FutureCallback> callback) { Args.notNull(keys, "Key"); Args.notNull(callback, "Callback"); diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/BasicTestAuthenticator.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/BasicTestAuthenticator.java index 933071e69..aeac33fa3 100644 --- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/BasicTestAuthenticator.java +++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/BasicTestAuthenticator.java @@ -42,6 +42,7 @@ public class BasicTestAuthenticator implements Authenticator { this.realm = realm; } + @Override public boolean authenticate(final URIAuthority authority, final String requestUri, final String credentials) { return Objects.equals(userToken, credentials); } diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/TestHttp1AsyncRedirects.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/TestHttp1AsyncRedirects.java index ec97c70ee..8212b2088 100644 --- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/TestHttp1AsyncRedirects.java +++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/TestHttp1AsyncRedirects.java @@ -169,6 +169,7 @@ public class TestHttp1AsyncRedirects extends AbstractHttpAsyncRedirectsTest() { diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestClientAuthentication.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestClientAuthentication.java index 398cea275..0e352987a 100644 --- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestClientAuthentication.java +++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestClientAuthentication.java @@ -100,6 +100,7 @@ public class TestClientAuthentication extends LocalServerTestBase { }); } + @Override public HttpHost start() throws IOException { return start(new BasicTestAuthenticator("test:test", "test realm")); } diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/RequestCopier.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/RequestCopier.java index b119018f5..9572d5c34 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/RequestCopier.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/RequestCopier.java @@ -36,6 +36,7 @@ public final class RequestCopier implements MessageCopier { public static final RequestCopier INSTANCE = new RequestCopier(); + @Override public HttpRequest copy(final HttpRequest original) { if (original == null) { return null; diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ClassicRequestCopier.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ClassicRequestCopier.java index 12f044d34..ab2f7baa1 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ClassicRequestCopier.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ClassicRequestCopier.java @@ -37,6 +37,7 @@ public final class ClassicRequestCopier implements MessageCopier