Skip to content

Commit fa02c01

Browse files
committed
Polish
1 parent bff39e9 commit fa02c01

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ public void customize(ConfigurableEmbeddedServletContainer container) {
8585
this.managementServerProperties = BeanFactoryUtils
8686
.beanOfTypeIncludingAncestors(this.beanFactory,
8787
ManagementServerProperties.class);
88-
this.server = BeanFactoryUtils
89-
.beanOfTypeIncludingAncestors(this.beanFactory,
90-
ServerProperties.class);
88+
this.server = BeanFactoryUtils.beanOfTypeIncludingAncestors(
89+
this.beanFactory, ServerProperties.class);
9190
}
92-
// Customize as per the parent context first (so e.g. the access logs go to the same place)
91+
// Customize as per the parent context first (so e.g. the access logs go to
92+
// the same place)
9393
server.customize(container);
9494
// Then reset the error pages
95-
container.setErrorPages(Collections.<ErrorPage>emptySet());
95+
container.setErrorPages(Collections.<ErrorPage> emptySet());
9696
// and add the management-specific bits
9797
container.setPort(this.managementServerProperties.getPort());
9898
container.setAddress(this.managementServerProperties.getAddress());

spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcAutoConfigurationTests.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ public void portPropertiesOnDifferentPort() throws Exception {
223223
assertThat(localServerPort, notNullValue());
224224
assertThat(localManagementPort, notNullValue());
225225
assertThat(localServerPort, not(equalTo(localManagementPort)));
226-
assertThat(applicationContext.getBean(ServerPortConfig.class).getCount(), equalTo(2));
226+
assertThat(this.applicationContext.getBean(ServerPortConfig.class).getCount(),
227+
equalTo(2));
227228
this.applicationContext.close();
228229
assertAllClosed();
229230
}
@@ -305,19 +306,19 @@ public TestEndpoint testEndpoint() {
305306

306307
@Configuration
307308
public static class ServerPortConfig {
308-
309+
309310
private int count = 0;
310-
311+
311312
public int getCount() {
312-
return count;
313+
return this.count;
313314
}
314315

315316
@Bean
316317
public ServerProperties serverProperties() {
317318
ServerProperties properties = new ServerProperties() {
318319
@Override
319320
public void customize(ConfigurableEmbeddedServletContainer container) {
320-
count++;
321+
ServerPortConfig.this.count++;
321322
super.customize(container);
322323
}
323324
};

0 commit comments

Comments
 (0)