Skip to content

Commit 2cdceb9

Browse files
committed
Polish
1 parent b29e81f commit 2cdceb9

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilterTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void unhandledError() {
186186
void streamingError() throws Exception {
187187
MvcResult result = this.mvc.perform(get("/api/c1/streamingError")).andExpect(request().asyncStarted())
188188
.andReturn();
189-
assertThatCode(() -> this.mvc.perform(asyncDispatch(result)).andExpect(status().isOk()));
189+
this.mvc.perform(asyncDispatch(result)).andExpect(status().isOk());
190190
assertThat(this.registry.get("http.server.requests").tags("exception", "IOException").timer().count())
191191
.isEqualTo(1L);
192192
}

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsIntegrationTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
4747

4848
import static org.assertj.core.api.Assertions.assertThat;
49-
import static org.assertj.core.api.Assertions.assertThatCode;
5049
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
5150
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
5251

@@ -84,8 +83,8 @@ void handledExceptionIsRecordedInMetricTag() throws Exception {
8483
}
8584

8685
@Test
87-
void rethrownExceptionIsRecordedInMetricTag() {
88-
assertThatCode(() -> this.mvc.perform(get("/api/rethrownError")).andExpect(status().is5xxServerError()));
86+
void rethrownExceptionIsRecordedInMetricTag() throws Exception {
87+
this.mvc.perform(get("/api/rethrownError")).andExpect(status().is5xxServerError());
8988
assertThat(this.registry.get("http.server.requests").tags("exception", "Exception2", "status", "500").timer()
9089
.count()).isEqualTo(1L);
9190
}

spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/metadata/TestJsonConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class TestJsonConverter extends JsonConverter {
3131

3232
@Override
3333
public JSONArray toJsonArray(ConfigurationMetadata metadata, ItemType itemType) throws Exception {
34-
return toJsonArray(metadata, itemType);
34+
return super.toJsonArray(metadata, itemType);
3535
}
3636

3737
@Override

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyWebServer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ private DisposableServer startHttpServer() {
106106
}
107107

108108
private void applyRouteProviders(HttpServerRoutes routes) {
109-
this.routeProviders.forEach((provider) -> provider.apply(routes));
109+
for (NettyRouteProvider provider : this.routeProviders) {
110+
routes = provider.apply(routes);
111+
}
110112
routes.route(ALWAYS, this.handlerAdapter);
111113
}
112114

0 commit comments

Comments
 (0)