Skip to content

Commit a81558e

Browse files
committed
Polishing
1 parent 0fb9de5 commit a81558e

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

spring-web/src/main/java/org/springframework/web/service/annotation/HttpExchange.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
/**
2929
* Annotation to declare a method on an HTTP service interface as an HTTP
3030
* endpoint. The endpoint details are defined statically through attributes of
31-
* the annotation, as well as through the input method argument values.
31+
* the annotation, as well as through the input method argument types.
3232
*
3333
* <p>Supported at the type level to express common attributes, to be inherited
3434
* by all methods, such as a base URL path.
3535
*
36-
* <p>At the method level, it's more common to use one of the below HTTP method
37-
* specific, shortcut annotation, each of which is itself <em>meta-annotated</em>
36+
* <p>At the method level, it's more common to use one of the following HTTP method
37+
* specific, shortcut annotations, each of which is itself <em>meta-annotated</em>
3838
* with {@code HttpExchange}:
3939
*
4040
* <ul>

spring-web/src/test/java/org/springframework/web/service/invoker/HttpServiceMethodTests.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ void rxJavaService() {
132132

133133
@Test
134134
void blockingService() {
135-
136135
BlockingService service = this.proxyFactory.createClient(BlockingService.class);
137136

138137
service.execute();
@@ -144,7 +143,7 @@ void blockingService() {
144143
assertThat(body).isEqualTo("requestToBody");
145144

146145
Optional<String> optional = service.getBodyOptional();
147-
assertThat(optional).isEqualTo(Optional.of("requestToBody"));
146+
assertThat(optional).contains("requestToBody");
148147

149148
ResponseEntity<String> entity = service.getEntity();
150149
assertThat(entity.getBody()).isEqualTo("requestToEntity");
@@ -155,7 +154,6 @@ void blockingService() {
155154

156155
@Test
157156
void methodAnnotatedService() {
158-
159157
MethodLevelAnnotatedService service = this.proxyFactory.createClient(MethodLevelAnnotatedService.class);
160158

161159
service.performGet();
@@ -177,7 +175,6 @@ void methodAnnotatedService() {
177175

178176
@Test
179177
void typeAndMethodAnnotatedService() throws Exception {
180-
181178
HttpServiceProxyFactory proxyFactory = new HttpServiceProxyFactory(this.client);
182179
proxyFactory.setEmbeddedValueResolver(value -> (value.equals("${baseUrl}") ? "/base" : value));
183180
proxyFactory.afterPropertiesSet();
@@ -202,7 +199,7 @@ void typeAndMethodAnnotatedService() throws Exception {
202199
}
203200

204201
private void verifyClientInvocation(String methodName, @Nullable ParameterizedTypeReference<?> expectedBodyType) {
205-
assertThat((this.client.getInvokedMethodName())).isEqualTo(methodName);
202+
assertThat(this.client.getInvokedMethodName()).isEqualTo(methodName);
206203
assertThat(this.client.getBodyType()).isEqualTo(expectedBodyType);
207204
}
208205

0 commit comments

Comments
 (0)