Merge pull request #12584 from izeye:polish-20180322
* pr/12584: Polish contribution Polish
This commit is contained in:
commit
5c04e7dd7f
|
|
@ -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 {
|
|||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(TomcatMetrics.class)
|
||||
public TomcatMetrics tomcatMetrics(ApplicationContext applicationContext) {
|
||||
public TomcatMetrics tomcatMetrics() {
|
||||
return new TomcatMetrics(this.context == null ? null : this.context.getManager(),
|
||||
Collections.emptyList());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
|||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class HazelcastCacheMeterBinderProviderTests {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
|||
|
|
@ -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,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -170,7 +170,6 @@ public class ReproTests {
|
|||
.isEqualTo(expectedActiveProfiles);
|
||||
assertThat(context.getEnvironment().getProperty("version")).as("version mismatch")
|
||||
.isEqualTo(expectedVersion);
|
||||
context.close();
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ public class ConfigFileApplicationListenerYamlProfileNegationTests {
|
|||
.isEqualTo(expectedActiveProfiles);
|
||||
assertThat(context.getEnvironment().getProperty("version")).as("version mismatch")
|
||||
.isEqualTo(expectedVersion);
|
||||
context.close();
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
|
|
|||
Loading…
Reference in New Issue