Browse Source

Polish

pull/11587/head
Phillip Webb 8 years ago
parent
commit
b3ec2c9d1d
  1. 7
      spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/annotation/AnnotationEndpointDiscoverer.java
  2. 4
      spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/cache/CacheMetricsRegistrar.java
  3. 7
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/MessageSourceAutoConfigurationTests.java
  4. 11
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessor.java
  5. 4
      spring-boot-tests/spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java

7
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; @@ -63,7 +63,8 @@ import org.springframework.util.StringUtils;
public abstract class AnnotationEndpointDiscoverer<K, T extends Operation>
implements EndpointDiscoverer<T> {
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<K, T extends Operation> @@ -280,7 +281,9 @@ public abstract class AnnotationEndpointDiscoverer<K, T extends Operation>
// 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;
}

4
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/cache/CacheMetricsRegistrar.java vendored

@ -96,8 +96,8 @@ public class CacheMetricsRegistrar { @@ -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: "

7
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/context/MessageSourceAutoConfigurationTests.java

@ -58,8 +58,8 @@ public class MessageSourceAutoConfigurationTests { @@ -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 { @@ -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");
});
}

11
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/WebServerFactoryCustomizerBeanPostProcessor.java

@ -45,7 +45,8 @@ import org.springframework.util.Assert; @@ -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 @@ -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 @@ -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);
}
}

4
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; @@ -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;

Loading…
Cancel
Save