Remove deprecated code

See gh-24806
This commit is contained in:
Stephane Nicoll
2021-01-15 09:53:45 +01:00
parent a18f01addf
commit 2c2c160579
48 changed files with 89 additions and 1149 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -104,22 +104,6 @@ public class CachingOperationInvoker implements OperationInvoker {
return new CachedResponse(response, accessTime);
}
/**
* Apply caching configuration when appropriate to the given invoker.
* @param invoker the invoker to wrap
* @param timeToLive the maximum time in milliseconds that a response can be cached
* @return a caching version of the invoker or the original instance if caching is not
* required
* @deprecated as of 2.3.0 to make it package-private in 2.4
*/
@Deprecated
public static OperationInvoker apply(OperationInvoker invoker, long timeToLive) {
if (timeToLive > 0) {
return new CachingOperationInvoker(invoker, timeToLive);
}
return invoker;
}
/**
* A cached response that encapsulates the response itself and the time at which it
* was created.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -94,30 +94,6 @@ public final class WebClientExchangeTags {
return CLIENT_ERROR;
}
/**
* Creates a {@code status} {@code Tag} derived from the
* {@link ClientResponse#statusCode()} of the given {@code response}.
* @param response the response
* @return the status tag
* @deprecated since 2.3.0 in favor of {@link #status(ClientResponse, Throwable)}
*/
@Deprecated
public static Tag status(ClientResponse response) {
return Tag.of("status", String.valueOf(response.rawStatusCode()));
}
/**
* Creates a {@code status} {@code Tag} derived from the exception thrown by the
* client.
* @param throwable the exception
* @return the status tag
* @deprecated since 2.3.0 in favor of {@link #status(ClientResponse, Throwable)}
*/
@Deprecated
public static Tag status(Throwable throwable) {
return (throwable instanceof IOException) ? IO_ERROR : CLIENT_ERROR;
}
/**
* Create a {@code clientName} {@code Tag} derived from the
* {@link java.net.URI#getHost host} of the {@link ClientRequest#url() URL} of the