Skip to content

Commit 5c04e7d

Browse files
committed
Merge pull request #12584 from izeye:polish-20180322
* pr/12584: Polish contribution Polish
2 parents 64a4f70 + 47307db commit 5c04e7d

File tree

5 files changed

+3
-9
lines changed

5 files changed

+3
-9
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/tomcat/TomcatMetricsAutoConfiguration.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.springframework.boot.web.embedded.tomcat.TomcatReactiveWebServerFactory;
3131
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
3232
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
33-
import org.springframework.context.ApplicationContext;
3433
import org.springframework.context.annotation.Bean;
3534

3635
/**
@@ -47,7 +46,7 @@ public class TomcatMetricsAutoConfiguration {
4746

4847
@Bean
4948
@ConditionalOnMissingBean(TomcatMetrics.class)
50-
public TomcatMetrics tomcatMetrics(ApplicationContext applicationContext) {
49+
public TomcatMetrics tomcatMetrics() {
5150
return new TomcatMetrics(this.context == null ? null : this.context.getManager(),
5251
Collections.emptyList());
5352
}

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/cache/HazelcastCacheMeterBinderProviderTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
import io.micrometer.core.instrument.binder.MeterBinder;
2424
import io.micrometer.core.instrument.binder.cache.HazelcastCacheMetrics;
2525
import org.junit.Test;
26-
import org.junit.runner.RunWith;
27-
import org.mockito.junit.MockitoJUnitRunner;
2826

2927
import static org.assertj.core.api.Assertions.assertThat;
3028
import static org.mockito.BDDMockito.given;
@@ -35,7 +33,6 @@
3533
*
3634
* @author Stephane Nicoll
3735
*/
38-
@RunWith(MockitoJUnitRunner.class)
3936
public class HazelcastCacheMeterBinderProviderTests {
4037

4138
@SuppressWarnings("unchecked")

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public void responseCommitted() {
269269
}
270270

271271
@Test
272-
public void whilelabelDisabled() {
272+
public void whitelabelDisabled() {
273273
this.contextRunner.withPropertyValues("server.error.whitelabel.enabled=false",
274274
"spring.mustache.prefix=classpath:/unknown/").run((context) -> {
275275
WebTestClient client = WebTestClient.bindToApplicationContext(context)

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ReproTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -170,7 +170,6 @@ private void assertVersionProperty(ConfigurableApplicationContext context,
170170
.isEqualTo(expectedActiveProfiles);
171171
assertThat(context.getEnvironment().getProperty("version")).as("version mismatch")
172172
.isEqualTo(expectedVersion);
173-
context.close();
174173
}
175174

176175
@Configuration

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerYamlProfileNegationTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ private void assertVersionProperty(ConfigurableApplicationContext context,
136136
.isEqualTo(expectedActiveProfiles);
137137
assertThat(context.getEnvironment().getProperty("version")).as("version mismatch")
138138
.isEqualTo(expectedVersion);
139-
context.close();
140139
}
141140

142141
@Configuration

0 commit comments

Comments
 (0)