Skip to content

Commit

Permalink
Annotate RestClient retrieve() with @CheckReturnValue
Browse files Browse the repository at this point in the history
This annotation triggers a warning in IDEs supporting
`@CheckReturnValue` when retrieve() return value is not
used.

Closes gh-33818
  • Loading branch information
sdeleuze committed Oct 30, 2024
1 parent a005c32 commit 09d87fa
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.http.client.observation.ClientRequestObservationConvention;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.lang.CheckReturnValue;
import org.springframework.lang.Nullable;
import org.springframework.util.MultiValueMap;
import org.springframework.web.util.DefaultUriBuilderFactory;
Expand Down Expand Up @@ -644,6 +645,7 @@ interface RequestHeadersSpec<S extends RequestHeadersSpec<S>> {
* {@link ResponseSpec#onStatus(Predicate, ResponseSpec.ErrorHandler) onStatus} handlers.
* @return {@code ResponseSpec} to specify how to decode the body
*/
@CheckReturnValue
ResponseSpec retrieve();

/**
Expand Down

0 comments on commit 09d87fa

Please sign in to comment.