diff --git a/spring-web/src/main/java/org/springframework/web/service/annotation/HttpExchange.java b/spring-web/src/main/java/org/springframework/web/service/annotation/HttpExchange.java
index 58d6b8cae6b..774d33b5909 100644
--- a/spring-web/src/main/java/org/springframework/web/service/annotation/HttpExchange.java
+++ b/spring-web/src/main/java/org/springframework/web/service/annotation/HttpExchange.java
@@ -28,13 +28,13 @@ import org.springframework.web.bind.annotation.Mapping;
/**
* Annotation to declare a method on an HTTP service interface as an HTTP
* endpoint. The endpoint details are defined statically through attributes of
- * the annotation, as well as through the input method argument values.
+ * the annotation, as well as through the input method argument types.
*
*
Supported at the type level to express common attributes, to be inherited
* by all methods, such as a base URL path.
*
- *
At the method level, it's more common to use one of the below HTTP method
- * specific, shortcut annotation, each of which is itself meta-annotated
+ *
At the method level, it's more common to use one of the following HTTP method
+ * specific, shortcut annotations, each of which is itself meta-annotated
* with {@code HttpExchange}:
*
*
diff --git a/spring-web/src/test/java/org/springframework/web/service/invoker/HttpServiceMethodTests.java b/spring-web/src/test/java/org/springframework/web/service/invoker/HttpServiceMethodTests.java
index 84ab3eade0b..f926f52338a 100644
--- a/spring-web/src/test/java/org/springframework/web/service/invoker/HttpServiceMethodTests.java
+++ b/spring-web/src/test/java/org/springframework/web/service/invoker/HttpServiceMethodTests.java
@@ -132,7 +132,6 @@ public class HttpServiceMethodTests {
@Test
void blockingService() {
-
BlockingService service = this.proxyFactory.createClient(BlockingService.class);
service.execute();
@@ -144,7 +143,7 @@ public class HttpServiceMethodTests {
assertThat(body).isEqualTo("requestToBody");
Optional optional = service.getBodyOptional();
- assertThat(optional).isEqualTo(Optional.of("requestToBody"));
+ assertThat(optional).contains("requestToBody");
ResponseEntity entity = service.getEntity();
assertThat(entity.getBody()).isEqualTo("requestToEntity");
@@ -155,7 +154,6 @@ public class HttpServiceMethodTests {
@Test
void methodAnnotatedService() {
-
MethodLevelAnnotatedService service = this.proxyFactory.createClient(MethodLevelAnnotatedService.class);
service.performGet();
@@ -177,7 +175,6 @@ public class HttpServiceMethodTests {
@Test
void typeAndMethodAnnotatedService() throws Exception {
-
HttpServiceProxyFactory proxyFactory = new HttpServiceProxyFactory(this.client);
proxyFactory.setEmbeddedValueResolver(value -> (value.equals("${baseUrl}") ? "/base" : value));
proxyFactory.afterPropertiesSet();
@@ -202,7 +199,7 @@ public class HttpServiceMethodTests {
}
private void verifyClientInvocation(String methodName, @Nullable ParameterizedTypeReference> expectedBodyType) {
- assertThat((this.client.getInvokedMethodName())).isEqualTo(methodName);
+ assertThat(this.client.getInvokedMethodName()).isEqualTo(methodName);
assertThat(this.client.getBodyType()).isEqualTo(expectedBodyType);
}