You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2022/07/06 14:13:29 UTC
[httpcomponents-client] branch master updated: Cleaning up:
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git
The following commit(s) were added to refs/heads/master by this push:
new 1cd12fc1d Cleaning up:
1cd12fc1d is described below
commit 1cd12fc1dca77a827d38cee1e1ef4cbb88793763
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Jul 6 10:13:23 2022 -0400
Cleaning up:
- Super interface already implements FutureCallback
- No need to override methods to only call super
- Add missing Javadoc tag
- Access static field directly
---
.../hc/client5/http/impl/cache/AsyncCachingExec.java | 2 +-
.../apache/hc/client5/http/impl/cache/CachingExec.java | 2 +-
.../methods/IgnoreCompleteExceptonFutureCallback.java | 17 +----------------
.../hc/client5/http/cookie/CookieAttributeHandler.java | 1 +
4 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java
index ad7704d69..d4dc04cf0 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java
@@ -215,7 +215,7 @@ class AsyncCachingExec extends CachingExecBase implements AsyncExecChainHandler
final CancellableDependency operation = scope.cancellableDependency;
final HttpClientContext context = scope.clientContext;
context.setAttribute(HttpClientContext.HTTP_ROUTE, route);
- context.setAttribute(HttpClientContext.HTTP_REQUEST, request);
+ context.setAttribute(HttpCoreContext.HTTP_REQUEST, request);
final URIAuthority authority = request.getAuthority();
final String scheme = request.getScheme();
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingExec.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingExec.java
index dcfd70548..5b437eec3 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingExec.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingExec.java
@@ -163,7 +163,7 @@ class CachingExec extends CachingExecBase implements ExecChainHandler {
final HttpRoute route = scope.route;
final HttpClientContext context = scope.clientContext;
context.setAttribute(HttpClientContext.HTTP_ROUTE, scope.route);
- context.setAttribute(HttpClientContext.HTTP_REQUEST, request);
+ context.setAttribute(HttpCoreContext.HTTP_REQUEST, request);
final URIAuthority authority = request.getAuthority();
final String scheme = request.getScheme();
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/IgnoreCompleteExceptonFutureCallback.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/IgnoreCompleteExceptonFutureCallback.java
index d693807f7..b6950fd53 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/IgnoreCompleteExceptonFutureCallback.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/IgnoreCompleteExceptonFutureCallback.java
@@ -33,25 +33,10 @@ import org.apache.hc.core5.concurrent.FutureCallback;
* @since 5.2
*/
@Deprecated
-public class IgnoreCompleteExceptonFutureCallback<T> extends IgnoreCompleteExceptionFutureCallback<T> implements FutureCallback<T> {
+public class IgnoreCompleteExceptonFutureCallback<T> extends IgnoreCompleteExceptionFutureCallback<T> {
public IgnoreCompleteExceptonFutureCallback(final FutureCallback<T> callback) {
super(callback);
}
- @Override
- public void completed(final T result) {
- super.completed(result);
- }
-
- @Override
- public void failed(final Exception ex) {
- super.failed(ex);
- }
-
- @Override
- public void cancelled() {
- super.cancelled();
- }
-
}
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/cookie/CookieAttributeHandler.java b/httpclient5/src/main/java/org/apache/hc/client5/http/cookie/CookieAttributeHandler.java
index 898b307fe..10abd31d1 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/cookie/CookieAttributeHandler.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/cookie/CookieAttributeHandler.java
@@ -50,6 +50,7 @@ public interface CookieAttributeHandler {
*
* @param cookie {@link org.apache.hc.client5.http.cookie.Cookie} to be updated
* @param value cookie attribute value from the cookie response header
+ * @throws MalformedCookieException if cookie parsing fails for this attribute
*/
void parse(SetCookie cookie, String value)
throws MalformedCookieException;