Polishing

This commit is contained in:
Sam Brannen 2022-05-03 15:46:07 +02:00
parent c68665980f
commit 365a18c9c2
34 changed files with 32 additions and 67 deletions

View File

@ -24,7 +24,6 @@ import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AliasFor;
/** /**
* Shortcut for {@link HttpExchange} for HTTP DELETE requests. * Shortcut for {@link HttpExchange} for HTTP DELETE requests.
* *

View File

@ -24,7 +24,6 @@ import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AliasFor;
/** /**
* Shortcut for {@link HttpExchange} for HTTP GET requests. * Shortcut for {@link HttpExchange} for HTTP GET requests.
* *

View File

@ -24,7 +24,6 @@ import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AliasFor;
/** /**
* Shortcut for {@link HttpExchange} for HTTP HEAD requests. * Shortcut for {@link HttpExchange} for HTTP HEAD requests.
* *

View File

@ -26,14 +26,13 @@ import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.Mapping; import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.service.invoker.UrlArgumentResolver; import org.springframework.web.service.invoker.UrlArgumentResolver;
/** /**
* Annotation that declares an HTTP service method as an HTTP endpoint defined * Annotation that declares an HTTP service method as an HTTP endpoint defined
* through attributes of the annotation and method argument values. * through attributes of the annotation and method argument values.
* *
* <p>The annotation may only be used at the type level for example to specify * <p>The annotation may only be used at the type level &mdash; for example to
* a base URL path. At the method level, use one of the HTTP method specific, * specify a base URL path. At the method level, use one of the HTTP method
* shortcut annotations, each of which is <em>meta-annotated</em> with * specific, shortcut annotations, each of which is <em>meta-annotated</em> with
* {@link HttpExchange}: * {@link HttpExchange}:
* <ul> * <ul>
* <li>{@link GetExchange} * <li>{@link GetExchange}
@ -46,7 +45,7 @@ import org.springframework.web.service.invoker.UrlArgumentResolver;
* </ul> * </ul>
* *
* <p>Supported method arguments: * <p>Supported method arguments:
* <table> * <table border="1">
* <tr> * <tr>
* <th>Method Argument</th> * <th>Method Argument</th>
* <th>Description</th> * <th>Description</th>
@ -54,14 +53,14 @@ import org.springframework.web.service.invoker.UrlArgumentResolver;
* </tr> * </tr>
* <tr> * <tr>
* <td>{@link java.net.URI URI}</td> * <td>{@link java.net.URI URI}</td>
* <td>Dynamically set the URL for the request, overriding the annotation * <td>Dynamically set the URL for the request, overriding the annotation's
* {@link #url()} attribute</td> * {@link #url()} attribute</td>
* <td>{@link UrlArgumentResolver * <td>{@link UrlArgumentResolver
* HttpUrlArgumentResolver}</td> * HttpUrlArgumentResolver}</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>{@link org.springframework.http.HttpMethod HttpMethod}</td> * <td>{@link org.springframework.http.HttpMethod HttpMethod}</td>
* <td>Dynamically set the HTTP method for the request, overriding the annotation * <td>Dynamically set the HTTP method for the request, overriding the annotation's
* {@link #method()} attribute</td> * {@link #method()} attribute</td>
* <td>{@link org.springframework.web.service.invoker.HttpMethodArgumentResolver * <td>{@link org.springframework.web.service.invoker.HttpMethodArgumentResolver
* HttpMethodArgumentResolver}</td> * HttpMethodArgumentResolver}</td>

View File

@ -24,7 +24,6 @@ import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AliasFor;
/** /**
* Shortcut for {@link HttpExchange} for HTTP OPTIONS requests. * Shortcut for {@link HttpExchange} for HTTP OPTIONS requests.
* *

View File

@ -24,7 +24,6 @@ import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AliasFor;
/** /**
* Shortcut for {@link HttpExchange} for HTTP PATCH requests. * Shortcut for {@link HttpExchange} for HTTP PATCH requests.
* *

View File

@ -24,7 +24,6 @@ import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AliasFor;
/** /**
* Shortcut for {@link HttpExchange} for HTTP POST requests. * Shortcut for {@link HttpExchange} for HTTP POST requests.
* *

View File

@ -24,7 +24,6 @@ import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AliasFor;
/** /**
* Shortcut for {@link HttpExchange} for HTTP PUT requests. * Shortcut for {@link HttpExchange} for HTTP PUT requests.
* *

View File

@ -1,5 +1,5 @@
/** /**
* Annotations to declare HTTP service, request methods. * Annotations for declaring HTTP service request methods.
*/ */
@NonNullApi @NonNullApi
@NonNullFields @NonNullFields

View File

@ -32,7 +32,6 @@ import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.ValueConstants; import org.springframework.web.bind.annotation.ValueConstants;
/** /**
* Base class for arguments that resolve to a named request value such as a * Base class for arguments that resolve to a named request value such as a
* request header, path variable, cookie, and others. * request header, path variable, cookie, and others.
@ -52,7 +51,7 @@ public abstract class AbstractNamedValueArgumentResolver implements HttpServiceA
/** /**
* Create an instance. * Create an instance.
* @param conversionService the {@link ConversionService} to use to format * @param conversionService the {@link ConversionService} to use to format
* Object to String values. * Object to String values
*/ */
protected AbstractNamedValueArgumentResolver(ConversionService conversionService) { protected AbstractNamedValueArgumentResolver(ConversionService conversionService) {
Assert.notNull(conversionService, "ConversionService is required"); Assert.notNull(conversionService, "ConversionService is required");

View File

@ -20,7 +20,6 @@ import org.springframework.core.MethodParameter;
import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.ConversionService;
import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.CookieValue;
/** /**
* {@link HttpServiceArgumentResolver} for {@link CookieValue @CookieValue} * {@link HttpServiceArgumentResolver} for {@link CookieValue @CookieValue}
* annotated arguments. * annotated arguments.

View File

@ -23,10 +23,9 @@ import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
/** /**
* Contract to abstract the underlying HTTP client and decouple it from the * Contract to abstract the underlying HTTP client and decouple it from the
* {@link HttpServiceProxyFactory#createClient(Class) HTTP Service proxy}. * {@linkplain HttpServiceProxyFactory#createClient(Class) HTTP service proxy}.
* *
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @since 6.0 * @since 6.0

View File

@ -23,7 +23,6 @@ import org.springframework.core.MethodParameter;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;
/** /**
* {@link HttpServiceArgumentResolver} that resolves the target * {@link HttpServiceArgumentResolver} that resolves the target
* request's HTTP method from an {@link HttpMethod} argument. * request's HTTP method from an {@link HttpMethod} argument.

View File

@ -16,7 +16,6 @@
package org.springframework.web.service.invoker; package org.springframework.web.service.invoker;
import java.net.URI; import java.net.URI;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
@ -42,7 +41,6 @@ import org.springframework.util.MultiValueMap;
import org.springframework.web.util.UriComponentsBuilder; import org.springframework.web.util.UriComponentsBuilder;
import org.springframework.web.util.UriUtils; import org.springframework.web.util.UriUtils;
/** /**
* Container for HTTP request values extracted from an * Container for HTTP request values extracted from an
* {@link org.springframework.web.service.annotation.HttpExchange @HttpExchange}-annotated * {@link org.springframework.web.service.annotation.HttpExchange @HttpExchange}-annotated
@ -121,7 +119,7 @@ public final class HttpRequestValues {
/** /**
* Return the URL template for the request, if set. * Return the URL template for the request, if set.
* <p>This is mutually exclusive with a {@link #getUri() full URL}. * <p>This is mutually exclusive with a {@linkplain #getUri() full URL}.
* One of the two has a value but not both. * One of the two has a value but not both.
*/ */
@Nullable @Nullable
@ -171,7 +169,7 @@ public final class HttpRequestValues {
} }
/** /**
* Return the element type for a {@link #getBody() Publisher body}. * Return the element type for a {@linkplain #getBody() Publisher body}.
*/ */
@Nullable @Nullable
public ParameterizedTypeReference<?> getBodyElementType() { public ParameterizedTypeReference<?> getBodyElementType() {
@ -237,7 +235,8 @@ public final class HttpRequestValues {
/** /**
* Set the request URL as a full URL. * Set the request URL as a full URL.
* <p>This is mutually exclusive with, and resets any previously set * <p>This is mutually exclusive with, and resets any previously set
* {@link #setUriTemplate(String)}. * {@linkplain #setUriTemplate(String) URI template} or
* {@linkplain #setUriVariable(String, String) URI variables}.
*/ */
public Builder setUri(URI uri) { public Builder setUri(URI uri) {
this.uri = uri; this.uri = uri;
@ -249,7 +248,7 @@ public final class HttpRequestValues {
/** /**
* Set the request URL as a String template. * Set the request URL as a String template.
* <p>This is mutually exclusive with, and resets any previously set * <p>This is mutually exclusive with, and resets any previously set
* {@link #setUri(URI) full URI}. * {@linkplain #setUri(URI) full URI}.
*/ */
public Builder setUriTemplate(String uriTemplate) { public Builder setUriTemplate(String uriTemplate) {
this.uriTemplate = uriTemplate; this.uriTemplate = uriTemplate;
@ -260,7 +259,7 @@ public final class HttpRequestValues {
/** /**
* Add a URI variable name-value pair. * Add a URI variable name-value pair.
* <p>This is mutually exclusive with, and resets any previously set * <p>This is mutually exclusive with, and resets any previously set
* {@link #setUri(URI) full URI}. * {@linkplain #setUri(URI) full URI}.
*/ */
public Builder setUriVariable(String name, String value) { public Builder setUriVariable(String name, String value) {
this.uriVars = (this.uriVars != null ? this.uriVars : new LinkedHashMap<>()); this.uriVars = (this.uriVars != null ? this.uriVars : new LinkedHashMap<>());
@ -269,7 +268,6 @@ public final class HttpRequestValues {
return this; return this;
} }
/** /**
* Set the media types for the request {@code Accept} header. * Set the media types for the request {@code Accept} header.
*/ */
@ -330,7 +328,7 @@ public final class HttpRequestValues {
/** /**
* Set the request body as a concrete value to be serialized. * Set the request body as a concrete value to be serialized.
* <p>This is mutually exclusive with, and resets any previously set * <p>This is mutually exclusive with, and resets any previously set
* {@link #setBody(Publisher, ParameterizedTypeReference) body Publisher}. * {@linkplain #setBody(Publisher, ParameterizedTypeReference) body Publisher}.
*/ */
public void setBodyValue(Object bodyValue) { public void setBodyValue(Object bodyValue) {
this.bodyValue = bodyValue; this.bodyValue = bodyValue;
@ -341,7 +339,7 @@ public final class HttpRequestValues {
/** /**
* Set the request body as a concrete value to be serialized. * Set the request body as a concrete value to be serialized.
* <p>This is mutually exclusive with, and resets any previously set * <p>This is mutually exclusive with, and resets any previously set
* {@link #setBodyValue(Object) body value}. * {@linkplain #setBodyValue(Object) body value}.
*/ */
public <T, P extends Publisher<T>> void setBody(P body, ParameterizedTypeReference<T> elementTye) { public <T, P extends Publisher<T>> void setBody(P body, ParameterizedTypeReference<T> elementTye) {
this.body = body; this.body = body;

View File

@ -20,7 +20,6 @@ import org.springframework.core.MethodParameter;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;
import org.springframework.web.service.annotation.HttpExchange; import org.springframework.web.service.annotation.HttpExchange;
/** /**
* Resolve an argument from an {@link HttpExchange @HttpExchange}-annotated method * Resolve an argument from an {@link HttpExchange @HttpExchange}-annotated method
* to one or more HTTP request values. * to one or more HTTP request values.

View File

@ -16,7 +16,6 @@
package org.springframework.web.service.invoker; package org.springframework.web.service.invoker;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.time.Duration; import java.time.Duration;
import java.util.Arrays; import java.util.Arrays;
@ -45,10 +44,9 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.service.annotation.HttpExchange; import org.springframework.web.service.annotation.HttpExchange;
/** /**
* Implements the invocation of an {@link HttpExchange @HttpExchange}-annotated, * Implements the invocation of an {@link HttpExchange @HttpExchange}-annotated,
* {@link HttpServiceProxyFactory#createClient(Class) HTTP Service proxy} method * {@link HttpServiceProxyFactory#createClient(Class) HTTP service proxy} method
* by delegating to an {@link HttpClientAdapter} to perform actual requests. * by delegating to an {@link HttpClientAdapter} to perform actual requests.
* *
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
@ -128,8 +126,8 @@ final class HttpServiceMethod {
/** /**
* Factory for an {@link HttpRequestValues} with values extracted from * Factory for {@link HttpRequestValues} with values extracted from the type
* the type and method-level {@link HttpExchange @HttpRequest} annotations. * and method-level {@link HttpExchange @HttpRequest} annotations.
*/ */
private record HttpRequestValuesInitializer( private record HttpRequestValuesInitializer(
HttpMethod httpMethod, @Nullable String url, HttpMethod httpMethod, @Nullable String url,
@ -254,7 +252,7 @@ final class HttpServiceMethod {
/** /**
* Function to execute a request, obtain a response, and adapt to the expected * Function to execute a request, obtain a response, and adapt to the expected
* return type blocking if necessary. * return type, blocking if necessary.
*/ */
private record ResponseFunction( private record ResponseFunction(
Function<HttpRequestValues, Publisher<?>> responseFunction, Function<HttpRequestValues, Publisher<?>> responseFunction,
@ -288,7 +286,7 @@ final class HttpServiceMethod {
/** /**
* Create the {@code ResponseFunction} that matches method return type. * Create the {@code ResponseFunction} that matches the method's return type.
*/ */
public static ResponseFunction create( public static ResponseFunction create(
HttpClientAdapter client, Method method, ReactiveAdapterRegistry reactiveRegistry, HttpClientAdapter client, Method method, ReactiveAdapterRegistry reactiveRegistry,

View File

@ -37,7 +37,6 @@ import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.web.service.annotation.HttpExchange; import org.springframework.web.service.annotation.HttpExchange;
/** /**
* Factory for creating a client proxy given an HTTP service interface with * Factory for creating a client proxy given an HTTP service interface with
* {@link HttpExchange @HttpExchange} methods. * {@link HttpExchange @HttpExchange} methods.
@ -69,7 +68,7 @@ public final class HttpServiceProxyFactory {
/** /**
* Return a proxy that implements the given HTTP service interface to perform * Return a proxy that implements the given HTTP service interface to perform
* HTTP requests and retrieves responses through an HTTP client. * HTTP requests and retrieve responses through an HTTP client.
* @param serviceType the HTTP service to create a proxy for * @param serviceType the HTTP service to create a proxy for
* @param <S> the HTTP service type * @param <S> the HTTP service type
* @return the created proxy * @return the created proxy
@ -147,7 +146,7 @@ public final class HttpServiceProxyFactory {
/** /**
* Set the {@link ReactiveAdapterRegistry} to use to support different * Set the {@link ReactiveAdapterRegistry} to use to support different
* asynchronous types for HTTP Service method return values. * asynchronous types for HTTP service method return values.
* <p>By default this is {@link ReactiveAdapterRegistry#getSharedInstance()}. * <p>By default this is {@link ReactiveAdapterRegistry#getSharedInstance()}.
* @return the same builder instance * @return the same builder instance
*/ */
@ -157,7 +156,7 @@ public final class HttpServiceProxyFactory {
} }
/** /**
* Configure how long to wait for a response for an HTTP Service method * Configure how long to wait for a response for an HTTP service method
* with a synchronous (blocking) method signature. * with a synchronous (blocking) method signature.
* <p>By default this is 5 seconds. * <p>By default this is 5 seconds.
* @param blockTimeout the timeout value * @param blockTimeout the timeout value

View File

@ -20,13 +20,12 @@ import org.springframework.core.MethodParameter;
import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.ConversionService;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
/** /**
* {@link HttpServiceArgumentResolver} for {@link PathVariable @PathVariable} * {@link HttpServiceArgumentResolver} for {@link PathVariable @PathVariable}
* annotated arguments. * annotated arguments.
* *
* <p>The argument may be a single variable value or a {@code Map} with multiple * <p>The argument may be a single variable value or a {@code Map} with multiple
* variable and values. Each value may be a String or an Object to be converted * variables and values. Each value may be a String or an Object to be converted
* to a String through the configured {@link ConversionService}. * to a String through the configured {@link ConversionService}.
* *
* <p>If the value is required but {@code null}, {@link IllegalArgumentException} * <p>If the value is required but {@code null}, {@link IllegalArgumentException}

View File

@ -26,7 +26,6 @@ import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
/** /**
* {@link HttpServiceArgumentResolver} for {@link RequestBody @RequestBody} * {@link HttpServiceArgumentResolver} for {@link RequestBody @RequestBody}
* annotated arguments. * annotated arguments.

View File

@ -20,7 +20,6 @@ import org.springframework.core.MethodParameter;
import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.ConversionService;
import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestHeader;
/** /**
* {@link HttpServiceArgumentResolver} for {@link RequestHeader @RequestHeader} * {@link HttpServiceArgumentResolver} for {@link RequestHeader @RequestHeader}
* annotated arguments. * annotated arguments.

View File

@ -20,7 +20,6 @@ import org.springframework.core.MethodParameter;
import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.ConversionService;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
/** /**
* {@link HttpServiceArgumentResolver} for {@link RequestParam @RequestParam} * {@link HttpServiceArgumentResolver} for {@link RequestParam @RequestParam}
* annotated arguments. * annotated arguments.

View File

@ -21,10 +21,9 @@ import java.net.URI;
import org.springframework.core.MethodParameter; import org.springframework.core.MethodParameter;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;
/** /**
* {@link HttpServiceArgumentResolver} that resolves the URL for the request * {@link HttpServiceArgumentResolver} that resolves the URL for the request
* from an {@link URI} argument. * from a {@link URI} argument.
* *
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
* @since 6.0 * @since 6.0

View File

@ -1,5 +1,5 @@
/** /**
* Support to create a client proxy for an HTTP service annotated with * Support for creating a client proxy for an HTTP service annotated with
* {@link org.springframework.web.service.annotation.HttpExchange} methods. * {@link org.springframework.web.service.annotation.HttpExchange} methods.
*/ */
@NonNullApi @NonNullApi

View File

@ -26,9 +26,8 @@ import org.springframework.web.service.annotation.GetExchange;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* Unit tests for {@link RequestHeaderArgumentResolver}. * Unit tests for {@link CookieValueArgumentResolver}.
* <p>For base class functionality, see {@link NamedValueArgumentResolverTests}. * <p>For base class functionality, see {@link NamedValueArgumentResolverTests}.
* *
* @author Rossen Stoyanchev * @author Rossen Stoyanchev

View File

@ -24,7 +24,6 @@ import org.springframework.web.service.annotation.GetExchange;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException; import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
/** /**
* Tests for {@link HttpMethodArgumentResolver}. * Tests for {@link HttpMethodArgumentResolver}.
* *

View File

@ -16,7 +16,6 @@
package org.springframework.web.service.invoker; package org.springframework.web.service.invoker;
import java.net.URI; import java.net.URI;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -30,7 +29,6 @@ import org.springframework.web.util.UriComponentsBuilder;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* Unit tests for {@link HttpRequestValues}. * Unit tests for {@link HttpRequestValues}.
* *

View File

@ -16,7 +16,6 @@
package org.springframework.web.service.invoker; package org.springframework.web.service.invoker;
import io.reactivex.rxjava3.core.Completable; import io.reactivex.rxjava3.core.Completable;
import io.reactivex.rxjava3.core.Flowable; import io.reactivex.rxjava3.core.Flowable;
import io.reactivex.rxjava3.core.Single; import io.reactivex.rxjava3.core.Single;
@ -40,12 +39,11 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.http.MediaType.APPLICATION_CBOR_VALUE; import static org.springframework.http.MediaType.APPLICATION_CBOR_VALUE;
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
/** /**
* Tests for {@link HttpServiceMethod} with a test {@link TestHttpClientAdapter} * Tests for {@link HttpServiceMethod} with a test {@link TestHttpClientAdapter}
* that stubs the client invocations. * that stubs the client invocations.
* *
* <p>The tests do not create nor invoke {@code HttpServiceMethod} directly but * <p>The tests do not create or invoke {@code HttpServiceMethod} directly but
* rather use {@link HttpServiceProxyFactory} to create a service proxy in order to * rather use {@link HttpServiceProxyFactory} to create a service proxy in order to
* use a strongly typed interface without the need for class casts. * use a strongly typed interface without the need for class casts.
* *

View File

@ -41,7 +41,6 @@ import org.springframework.web.service.annotation.GetExchange;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/** /**
* Unit tests for {@link AbstractNamedValueArgumentResolver} through a * Unit tests for {@link AbstractNamedValueArgumentResolver} through a
* {@link TestValue @TestValue} annotation and {@link TestNamedValueArgumentResolver}. * {@link TestValue @TestValue} annotation and {@link TestNamedValueArgumentResolver}.
@ -230,7 +229,7 @@ class NamedValueArgumentResolverTests {
@Target(ElementType.PARAMETER) @Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Documented @Documented
public @interface TestValue { @interface TestValue {
@AliasFor("name") @AliasFor("name")
String value() default ""; String value() default "";

View File

@ -24,7 +24,6 @@ import org.springframework.web.service.annotation.GetExchange;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* Tests for {@link PathVariableArgumentResolver}. * Tests for {@link PathVariableArgumentResolver}.
* <p>For base class functionality, see {@link NamedValueArgumentResolverTests}. * <p>For base class functionality, see {@link NamedValueArgumentResolverTests}.

View File

@ -30,7 +30,6 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException; import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
/** /**
* Unit tests for {@link RequestBodyArgumentResolver}. * Unit tests for {@link RequestBodyArgumentResolver}.
* *
@ -63,6 +62,7 @@ public class RequestBodyArgumentResolverTests {
} }
@Test @Test
@SuppressWarnings("unchecked")
void singleBody() { void singleBody() {
String bodyValue = "bodyValue"; String bodyValue = "bodyValue";
this.service.executeSingle(Single.just(bodyValue)); this.service.executeSingle(Single.just(bodyValue));

View File

@ -26,7 +26,6 @@ import org.springframework.web.service.annotation.GetExchange;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* Unit tests for {@link RequestHeaderArgumentResolver}. * Unit tests for {@link RequestHeaderArgumentResolver}.
* <p>For base class functionality, see {@link NamedValueArgumentResolverTests}. * <p>For base class functionality, see {@link NamedValueArgumentResolverTests}.

View File

@ -24,7 +24,6 @@ import org.springframework.web.service.annotation.PostExchange;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* Unit tests for {@link RequestParamArgumentResolver}. * Unit tests for {@link RequestParamArgumentResolver}.
* *

View File

@ -26,7 +26,6 @@ import org.springframework.lang.Nullable;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* {@link HttpClientAdapter} with stubbed responses. * {@link HttpClientAdapter} with stubbed responses.
* *

View File

@ -25,7 +25,6 @@ import org.springframework.web.service.annotation.GetExchange;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException; import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
/** /**
* Unit tests for {@link UrlArgumentResolver}. * Unit tests for {@link UrlArgumentResolver}.
* *