From b3ec2c9d1d261270db2faf7f980c5232549d7c4d Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 9 Jan 2018 12:12:59 -0800 Subject: [PATCH] Polish --- .../annotation/AnnotationEndpointDiscoverer.java | 7 +++++-- .../actuate/metrics/cache/CacheMetricsRegistrar.java | 4 ++-- .../context/MessageSourceAutoConfigurationTests.java | 7 +++---- .../WebServerFactoryCustomizerBeanPostProcessor.java | 11 ++++++++--- .../boot/launchscript/SysVinitLaunchScriptIT.java | 4 ++-- 5 files changed, 20 insertions(+), 13 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/annotation/AnnotationEndpointDiscoverer.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/annotation/AnnotationEndpointDiscoverer.java index 0fa1c0ebab5..6a825dcc7dc 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/annotation/AnnotationEndpointDiscoverer.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/annotation/AnnotationEndpointDiscoverer.java @@ -63,7 +63,8 @@ import org.springframework.util.StringUtils; public abstract class AnnotationEndpointDiscoverer implements EndpointDiscoverer { - private static final Log logger = LogFactory.getLog(AnnotationEndpointDiscoverer.class); + private static final Log logger = LogFactory + .getLog(AnnotationEndpointDiscoverer.class); private final ApplicationContext applicationContext; @@ -280,7 +281,9 @@ public abstract class AnnotationEndpointDiscoverer // Possibly a lambda-defined EndpointFilter which we could not resolve the // generic EndpointInfo type for if (logger.isDebugEnabled()) { - logger.debug("Non-matching EndpointInfo for EndpointFilter: " + filter, ex); + logger.debug( + "Non-matching EndpointInfo for EndpointFilter: " + filter, + ex); } return false; } diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/cache/CacheMetricsRegistrar.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/cache/CacheMetricsRegistrar.java index c951c0bdc3f..b23a8f845b1 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/cache/CacheMetricsRegistrar.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/cache/CacheMetricsRegistrar.java @@ -96,8 +96,8 @@ public class CacheMetricsRegistrar { catch (ClassCastException ex) { String msg = ex.getMessage(); if (msg == null || msg.startsWith(cache.getClass().getName())) { - // Possibly a lambda-defined CacheMeterBinderProvider which we could not resolve - // the generic Cache type for + // Possibly a lambda-defined CacheMeterBinderProvider which we + // could not resolve the generic Cache type for if (logger.isDebugEnabled()) { logger.debug( "Non-matching Cache type for CacheMeterBinderProvider: " diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/MessageSourceAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/MessageSourceAutoConfigurationTests.java index 9a2cbe6c792..7ddbdf92fd8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/MessageSourceAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/MessageSourceAutoConfigurationTests.java @@ -58,8 +58,8 @@ public class MessageSourceAutoConfigurationTests { public void propertiesBundleWithSlashIsDetected() { this.contextRunner.withPropertyValues("spring.messages.basename:test/messages") .run((context) -> { - assertThat(context).hasSingleBean(MessageSource.class); assertThat( - context.getMessage("foo", null, "Foo message", Locale.UK)) + assertThat(context).hasSingleBean(MessageSource.class); + assertThat(context.getMessage("foo", null, "Foo message", Locale.UK)) .isEqualTo("bar"); }); } @@ -69,8 +69,7 @@ public class MessageSourceAutoConfigurationTests { this.contextRunner.withPropertyValues("spring.messages.basename:test.messages") .run((context) -> { assertThat(context).hasSingleBean(MessageSource.class); - assertThat( - context.getMessage("foo", null, "Foo message", Locale.UK)) + assertThat(context.getMessage("foo", null, "Foo message", Locale.UK)) .isEqualTo("bar"); }); } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessor.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessor.java index 3baa50c27e9..5986f91a048 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessor.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessor.java @@ -45,7 +45,8 @@ import org.springframework.util.Assert; public class WebServerFactoryCustomizerBeanPostProcessor implements BeanPostProcessor, BeanFactoryAware { - private static final Log logger = LogFactory.getLog(WebServerFactoryCustomizerBeanPostProcessor.class); + private static final Log logger = LogFactory + .getLog(WebServerFactoryCustomizerBeanPostProcessor.class); private ListableBeanFactory beanFactory; @@ -94,7 +95,8 @@ public class WebServerFactoryCustomizerBeanPostProcessor catch (ClassCastException ex) { String msg = ex.getMessage(); if (msg == null || msg.startsWith(webServerFactory.getClass().getName())) { - // Possibly a lambda-defined WebServerFactoryCustomizer which we could not resolve the + // Possibly a lambda-defined WebServerFactoryCustomizer which we could not + // resolve the // generic WebServerFactory type for logLambdaDebug(customizer, ex); } @@ -107,7 +109,10 @@ public class WebServerFactoryCustomizerBeanPostProcessor private void logLambdaDebug(WebServerFactoryCustomizer customizer, ClassCastException ex) { if (logger.isDebugEnabled()) { - logger.debug("Non-matching WebServerFactory type for WebServerFactoryCustomizer: " + customizer, ex); + logger.debug( + "Non-matching WebServerFactory type for WebServerFactoryCustomizer: " + + customizer, + ex); } } diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java index b3a3f58345c..52dc5e2e1d1 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java @@ -31,17 +31,17 @@ import javax.ws.rs.client.Entity; import javax.ws.rs.client.WebTarget; import com.github.dockerjava.api.DockerClient; +import com.github.dockerjava.api.DockerClientException; import com.github.dockerjava.api.command.DockerCmd; -import com.github.dockerjava.api.exception.DockerClientException; import com.github.dockerjava.api.model.BuildResponseItem; import com.github.dockerjava.api.model.Frame; +import com.github.dockerjava.core.CompressArchiveUtil; import com.github.dockerjava.core.DefaultDockerClientConfig; import com.github.dockerjava.core.DockerClientBuilder; import com.github.dockerjava.core.DockerClientConfig; import com.github.dockerjava.core.command.AttachContainerResultCallback; import com.github.dockerjava.core.command.BuildImageResultCallback; import com.github.dockerjava.core.command.WaitContainerResultCallback; -import com.github.dockerjava.core.util.CompressArchiveUtil; import com.github.dockerjava.jaxrs.AbstrSyncDockerCmdExec; import com.github.dockerjava.jaxrs.JerseyDockerCmdExecFactory; import org.assertj.core.api.Condition;