Cleaning up:

- Super interface already implements FutureCallback
- No need to override methods to only call super
- Add missing Javadoc tag
- Access static field directly
This commit is contained in:
Gary Gregory 2022-07-06 10:13:23 -04:00
parent fefbf0b756
commit 1cd12fc1dc
4 changed files with 4 additions and 18 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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();
}
}

View File

@ -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;