Skip to content

Commit 71b6dcf

Browse files
committed
Merge branch '6.2.x'
2 parents 5b1c552 + 8f9cbcd commit 71b6dcf

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Diff for: spring-web/src/main/java/org/springframework/web/client/RestClient.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ Builder defaultStatusHandler(Predicate<HttpStatusCode> statusPredicate,
494494

495495
/**
496496
* Contract for specifying the URI for a request.
497+
*
497498
* @param <S> a self reference to the spec type
498499
*/
499500
interface UriSpec<S extends RequestHeadersSpec<?>> {
@@ -537,6 +538,7 @@ interface UriSpec<S extends RequestHeadersSpec<?>> {
537538

538539
/**
539540
* Contract for specifying request headers leading up to the exchange.
541+
*
540542
* @param <S> a self reference to the spec type
541543
*/
542544
interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
@@ -730,6 +732,7 @@ interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
730732
* @param exchangeFunction the function to handle the response with
731733
* @param <T> the type the response will be transformed to
732734
* @return the value returned from the exchange function, never {@code null}
735+
* @since 6.2.6
733736
*/
734737
default <T> T exchangeForRequiredValue(RequiredValueExchangeFunction<T> exchangeFunction) {
735738
return exchangeForRequiredValue(exchangeFunction, true);
@@ -791,12 +794,14 @@ default <T> T exchangeForRequiredValue(RequiredValueExchangeFunction<T> exchange
791794
* {@code exchangeFunction} is invoked, {@code false} to keep it open
792795
* @param <T> the type the response will be transformed to
793796
* @return the value returned from the exchange function, never {@code null}
797+
* @since 6.2.6
794798
*/
795799
<T> T exchangeForRequiredValue(RequiredValueExchangeFunction<T> exchangeFunction, boolean close);
796800

797801

798802
/**
799803
* Defines the contract for {@link #exchange(ExchangeFunction)}.
804+
*
800805
* @param <T> the type the response will be transformed to
801806
*/
802807
@FunctionalInterface
@@ -814,6 +819,8 @@ interface ExchangeFunction<T> {
814819

815820
/**
816821
* Variant of {@link ExchangeFunction} returning a non-null required value.
822+
*
823+
* @since 6.2.6
817824
* @param <T> the type the response will be transformed to
818825
*/
819826
@FunctionalInterface
@@ -826,6 +833,7 @@ interface RequiredValueExchangeFunction<T> extends ExchangeFunction<T> {
826833
* @return the exchanged value, never {@code null}
827834
* @throws IOException in case of I/O errors
828835
*/
836+
@Override
829837
T exchange(HttpRequest clientRequest, ConvertibleClientHttpResponse clientResponse) throws IOException;
830838
}
831839

@@ -849,7 +857,6 @@ interface ConvertibleClientHttpResponse extends ClientHttpResponse {
849857
* @return the body, or {@code null} if no response body was available
850858
*/
851859
<T> @Nullable T bodyTo(ParameterizedTypeReference<T> bodyType);
852-
853860
}
854861
}
855862

@@ -1029,6 +1036,7 @@ interface ErrorHandler {
10291036

10301037
/**
10311038
* Contract for specifying request headers and URI for a request.
1039+
*
10321040
* @param <S> a self reference to the spec type
10331041
*/
10341042
interface RequestHeadersUriSpec<S extends RequestHeadersSpec<S>> extends UriSpec<S>, RequestHeadersSpec<S> {
@@ -1041,5 +1049,4 @@ interface RequestHeadersUriSpec<S extends RequestHeadersSpec<S>> extends UriSpec
10411049
interface RequestBodyUriSpec extends RequestBodySpec, RequestHeadersUriSpec<RequestBodySpec> {
10421050
}
10431051

1044-
10451052
}

0 commit comments

Comments
 (0)