Browse Source

Polish

See gh-12584
pull/12584/merge
Johnny Lim 8 years ago committed by Stephane Nicoll
parent
commit
625bf93598
  1. 3
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/tomcat/TomcatMetricsAutoConfiguration.java
  2. 3
      spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/cache/HazelcastCacheMeterBinderProviderTests.java
  3. 2
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTests.java
  4. 1
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ReproTests.java
  5. 1
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerYamlProfileNegationTests.java

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

@ -30,7 +30,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplicat @@ -30,7 +30,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplicat
import org.springframework.boot.web.embedded.tomcat.TomcatReactiveWebServerFactory;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
/**
@ -47,7 +46,7 @@ public class TomcatMetricsAutoConfiguration { @@ -47,7 +46,7 @@ public class TomcatMetricsAutoConfiguration {
@Bean
@ConditionalOnMissingBean(TomcatMetrics.class)
public TomcatMetrics tomcatMetrics(ApplicationContext applicationContext) {
public TomcatMetrics tomcatMetrics() {
return new TomcatMetrics(this.context == null ? null : this.context.getManager(),
Collections.emptyList());
}

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

@ -23,8 +23,6 @@ import com.hazelcast.spring.cache.HazelcastCache; @@ -23,8 +23,6 @@ import com.hazelcast.spring.cache.HazelcastCache;
import io.micrometer.core.instrument.binder.MeterBinder;
import io.micrometer.core.instrument.binder.cache.HazelcastCacheMetrics;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.BDDMockito.given;
@ -35,7 +33,6 @@ import static org.mockito.Mockito.mock; @@ -35,7 +33,6 @@ import static org.mockito.Mockito.mock;
*
* @author Stephane Nicoll
*/
@RunWith(MockitoJUnitRunner.class)
public class HazelcastCacheMeterBinderProviderTests {
@SuppressWarnings("unchecked")

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

@ -269,7 +269,7 @@ public class DefaultErrorWebExceptionHandlerIntegrationTests { @@ -269,7 +269,7 @@ public class DefaultErrorWebExceptionHandlerIntegrationTests {
}
@Test
public void whilelabelDisabled() {
public void whitelabelDisabled() {
this.contextRunner.withPropertyValues("server.error.whitelabel.enabled=false",
"spring.mustache.prefix=classpath:/unknown/").run((context) -> {
WebTestClient client = WebTestClient.bindToApplicationContext(context)

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

@ -170,7 +170,6 @@ public class ReproTests { @@ -170,7 +170,6 @@ public class ReproTests {
.isEqualTo(expectedActiveProfiles);
assertThat(context.getEnvironment().getProperty("version")).as("version mismatch")
.isEqualTo(expectedVersion);
context.close();
}
@Configuration

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

@ -136,7 +136,6 @@ public class ConfigFileApplicationListenerYamlProfileNegationTests { @@ -136,7 +136,6 @@ public class ConfigFileApplicationListenerYamlProfileNegationTests {
.isEqualTo(expectedActiveProfiles);
assertThat(context.getEnvironment().getProperty("version")).as("version mismatch")
.isEqualTo(expectedVersion);
context.close();
}
@Configuration

Loading…
Cancel
Save