From 8f9cbcd86d7a02543a4858850d0542c2eef66b87 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Thu, 3 Apr 2025 10:33:19 +0200 Subject: [PATCH] =?UTF-8?q?Add=20@=E2=81=A0since=20tags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See gh-34692 --- .../org/springframework/web/client/RestClient.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/web/client/RestClient.java b/spring-web/src/main/java/org/springframework/web/client/RestClient.java index af9c6722e5e..0be18c1c4b1 100644 --- a/spring-web/src/main/java/org/springframework/web/client/RestClient.java +++ b/spring-web/src/main/java/org/springframework/web/client/RestClient.java @@ -475,6 +475,7 @@ public interface RestClient { /** * Contract for specifying the URI for a request. + * * @param a self reference to the spec type */ interface UriSpec> { @@ -518,6 +519,7 @@ public interface RestClient { /** * Contract for specifying request headers leading up to the exchange. + * * @param a self reference to the spec type */ interface RequestHeadersSpec> { @@ -701,6 +703,7 @@ public interface RestClient { * @param exchangeFunction the function to handle the response with * @param the type the response will be transformed to * @return the value returned from the exchange function, never {@code null} + * @since 6.2.6 */ default T exchangeForRequiredValue(RequiredValueExchangeFunction exchangeFunction) { return exchangeForRequiredValue(exchangeFunction, true); @@ -763,12 +766,14 @@ public interface RestClient { * {@code exchangeFunction} is invoked, {@code false} to keep it open * @param the type the response will be transformed to * @return the value returned from the exchange function, never {@code null} + * @since 6.2.6 */ T exchangeForRequiredValue(RequiredValueExchangeFunction exchangeFunction, boolean close); /** * Defines the contract for {@link #exchange(ExchangeFunction)}. + * * @param the type the response will be transformed to */ @FunctionalInterface @@ -787,6 +792,8 @@ public interface RestClient { /** * Variant of {@link ExchangeFunction} returning a non-null required value. + * + * @since 6.2.6 * @param the type the response will be transformed to */ @FunctionalInterface @@ -799,6 +806,7 @@ public interface RestClient { * @return the exchanged value, never {@code null} * @throws IOException in case of I/O errors */ + @Override T exchange(HttpRequest clientRequest, ConvertibleClientHttpResponse clientResponse) throws IOException; } @@ -824,7 +832,6 @@ public interface RestClient { */ @Nullable T bodyTo(ParameterizedTypeReference bodyType); - } } @@ -1006,6 +1013,7 @@ public interface RestClient { /** * Contract for specifying request headers and URI for a request. + * * @param a self reference to the spec type */ interface RequestHeadersUriSpec> extends UriSpec, RequestHeadersSpec { @@ -1018,5 +1026,4 @@ public interface RestClient { interface RequestBodyUriSpec extends RequestBodySpec, RequestHeadersUriSpec { } - }