Skip to content

Commit 2b22b23

Browse files
committed
Polish
1 parent 6f07155 commit 2b22b23

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,11 @@ public void longTaskTimingInterceptorIsRegistered() {
150150
MeterRegistryConfiguration.class)
151151
.withConfiguration(AutoConfigurations.of(MetricsAutoConfiguration.class,
152152
WebMvcAutoConfiguration.class))
153-
.run((context) -> {
154-
assertThat(context.getBean(RequestMappingHandlerMapping.class))
155-
.extracting("interceptors").element(0).asList()
156-
.extracting((item) -> (Class) item.getClass())
157-
.contains(LongTaskTimingHandlerInterceptor.class);
158-
});
153+
.run((context) -> assertThat(
154+
context.getBean(RequestMappingHandlerMapping.class))
155+
.extracting("interceptors").element(0).asList()
156+
.extracting((item) -> (Class) item.getClass())
157+
.contains(LongTaskTimingHandlerInterceptor.class));
159158
}
160159

161160
private MeterRegistry getInitializedMeterRegistry(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright 2012-2018 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* Spring Boot specific {@link org.springframework.web.server.WebFilter} implementations.
19+
*/
20+
package org.springframework.boot.web.reactive.filter;

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,8 @@ public void exceptionThrownOnLoadFailureWhenFailCtxIfServletStartFailsIsTrue() {
437437
((StandardContext) context).setFailCtxIfServletStartFails(true);
438438
}
439439
});
440-
this.webServer = factory.getWebServer((context) -> {
441-
context.addServlet("failing", FailingServlet.class).setLoadOnStartup(0);
442-
});
440+
this.webServer = factory.getWebServer((context) -> context
441+
.addServlet("failing", FailingServlet.class).setLoadOnStartup(0));
443442
this.thrown.expect(WebServerException.class);
444443
this.webServer.start();
445444
}

0 commit comments

Comments
 (0)