From 14c9f91aaba2c396f38eab4ab3e0501f5a267c72 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Tue, 22 Aug 2017 18:28:14 +0900 Subject: [PATCH] Polish Closes gh-10054 --- .../boot/actuate/health/HealthIndicatorFactory.java | 2 +- .../boot/actuate/health/HealthStatusHttpMapper.java | 4 ++-- .../jms/activemq/ActiveMQAutoConfigurationTests.java | 10 +++++----- spring-boot-docs/src/main/asciidoc/howto.adoc | 6 +++--- .../src/main/asciidoc/spring-boot-features.adoc | 8 ++++---- .../web/client/RestClientExcludeFilter.java | 2 +- .../tomcat/TomcatEmbeddedWebappClassLoader.java | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthIndicatorFactory.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthIndicatorFactory.java index ec216065fa..b57e895f03 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthIndicatorFactory.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthIndicatorFactory.java @@ -32,7 +32,7 @@ public class HealthIndicatorFactory { * Create a {@link CompositeHealthIndicator} based on the specified health indicators. * @param healthAggregator the {@link HealthAggregator} * @param healthIndicators the {@link HealthIndicator} instances mapped by name - * @return an {@link HealthIndicator} that delegates to the specified + * @return a {@link HealthIndicator} that delegates to the specified * {@code healthIndicators}. */ public HealthIndicator createHealthIndicator( diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthStatusHttpMapper.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthStatusHttpMapper.java index 58f3e44372..7e543751dc 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthStatusHttpMapper.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthStatusHttpMapper.java @@ -46,7 +46,7 @@ public class HealthStatusHttpMapper { /** * Set specific status mappings. - * @param statusMapping a map of status code to {@code HttpStatus} + * @param statusMapping a map of health status code to HTTP status code */ public void setStatusMapping(Map statusMapping) { Assert.notNull(statusMapping, "StatusMapping must not be null"); @@ -55,7 +55,7 @@ public class HealthStatusHttpMapper { /** * Add specific status mappings to the existing set. - * @param statusMapping a map of status code to {@code HttpStatus} + * @param statusMapping a map of health status code to HTTP status code */ public void addStatusMapping(Map statusMapping) { Assert.notNull(statusMapping, "StatusMapping must not be null"); diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQAutoConfigurationTests.java index 18f2e03a56..061daec763 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQAutoConfigurationTests.java @@ -34,7 +34,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mockingDetails; /** - * Tests for {@link ActiveMQAutoConfiguration} + * Tests for {@link ActiveMQAutoConfiguration}. * * @author Andy Wilkinson * @author Aurélien Leboulanger @@ -68,7 +68,7 @@ public class ActiveMQAutoConfigurationTests { } @Test - public void defaultsConnectionFactoryAreApplied() { + public void defaultConnectionFactoryIsApplied() { this.contextRunner.withUserConfiguration(EmptyConfiguration.class) .withPropertyValues("spring.activemq.pool.enabled=false") .run((context) -> { @@ -96,7 +96,7 @@ public class ActiveMQAutoConfigurationTests { } @Test - public void customConnectionFactoryAreApplied() { + public void customConnectionFactoryIsApplied() { this.contextRunner.withUserConfiguration(EmptyConfiguration.class) .withPropertyValues("spring.activemq.pool.enabled=false", "spring.activemq.brokerUrl=vm://localhost?useJmx=false&broker.persistent=false", @@ -124,7 +124,7 @@ public class ActiveMQAutoConfigurationTests { } @Test - public void defaultsPooledConnectionFactoryAreApplied() { + public void defaultPooledConnectionFactoryIsApplied() { this.contextRunner.withUserConfiguration(EmptyConfiguration.class) .withPropertyValues("spring.activemq.pool.enabled=true") .run((context) -> { @@ -160,7 +160,7 @@ public class ActiveMQAutoConfigurationTests { } @Test - public void customPooledConnectionFactoryAreApplied() { + public void customPooledConnectionFactoryIsApplied() { this.contextRunner.withUserConfiguration(EmptyConfiguration.class) .withPropertyValues("spring.activemq.pool.enabled=true", "spring.activemq.pool.blockIfFull=false", diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index 4338c6b393..e078991044 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -75,7 +75,7 @@ rules of thumb: are `server.port`, `server.address` etc. In a running Actuator app look at the `configprops` endpoint. * Look for uses of the `bind` method on the `Binder` to pull configuration values explicitly out of the - `Environment` in a relaxed manner. It is often is used with a prefix. + `Environment` in a relaxed manner. It is often used with a prefix. * Look for `@Value` annotations that bind directly to the `Environment`. * Look for `@ConditionalOnExpression` annotations that switch features on and off in response to SpEL expressions, normally evaluated with placeholders resolved from the @@ -125,7 +125,7 @@ TIP: The `Environment` will already have been prepared with all the usual proper that Spring Boot loads by default. It is therefore possible to get the location of the file from the environment. This example adds the `custom-resource` property source at the end of the list so that a key defined in any of the usual other locations takes -precedence. A custom implementation may obviously defines another order. +precedence. A custom implementation may obviously define another order. NOTE: While using `@PropertySource` on your `@SpringBootApplication` seems convenient and easy enough to load a custom resource in the `Environment`, we do not recommend it as @@ -835,7 +835,7 @@ nuclear option is to add your own `TomcatServletWebServerFactory`. [[howto-enable-multiple-connectors-in-tomcat]] === Enable Multiple Connectors with Tomcat -Add a `org.apache.catalina.connector.Connector` to the +Add an `org.apache.catalina.connector.Connector` to the `TomcatServletWebServerFactory` which can allow multiple connectors, e.g. HTTP and HTTPS connector: diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 1d64a16679..81c5447d73 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -560,7 +560,7 @@ the search order becomes: This search ordering allows you to specify default values in one configuration file and then selectively override those values in another. You can provide default values -for you application in `application.properties` (or whatever other basename you choose +for your application in `application.properties` (or whatever other basename you choose with `spring.config.name`) in one of the default locations. These default values can then be overriden at runtime with a different file located in one of the custom locations. @@ -2872,7 +2872,7 @@ language feature). Example: [[boot-features-security-custom-user-info-client]] ==== Client To make your web-app into an OAuth2 client you can simply add `@EnableOAuth2Client` and -Spring Boot will create a `OAuth2ClientContext` and `OAuth2ProtectedResourceDetails` that +Spring Boot will create an `OAuth2ClientContext` and `OAuth2ProtectedResourceDetails` that are necessary to create an `OAuth2RestOperations`. Spring Boot does not automatically create such bean but you can easily create your own: @@ -4279,7 +4279,7 @@ If the connection to InfluxDB requires a user and password, you can set the `spring.influx.user` and `spring.influx.password` properties accordingly. InfluxDB relies on OkHttp. If you need to tune the http client `InfluxDB` uses behind the -scenes, you can register a `OkHttpClient.Builder` bean. +scenes, you can register an `OkHttpClient.Builder` bean. @@ -4443,7 +4443,7 @@ There are several ways to customize the underlying `javax.cache.cacheManager`: invoked with the reference of the `CacheManager` for full customization. TIP: If a standard `javax.cache.CacheManager` bean is defined, it is wrapped -automatically in a `org.springframework.cache.CacheManager` implementation that the +automatically in an `org.springframework.cache.CacheManager` implementation that the abstraction expects. No further customization is applied on it. diff --git a/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/RestClientExcludeFilter.java b/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/RestClientExcludeFilter.java index d39569a619..f3344c6456 100644 --- a/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/RestClientExcludeFilter.java +++ b/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/RestClientExcludeFilter.java @@ -41,7 +41,7 @@ class RestClientExcludeFilter extends AnnotationCustomizableTypeExcludeFilter { static { Set> includes = new LinkedHashSet<>(); - if (ClassUtils.isPresent("com.fasterxml.jackson.databind.Module", + if (ClassUtils.isPresent(DATABIND_MODULE_CLASS_NAME, RestClientExcludeFilter.class.getClassLoader())) { try { includes.add(Class.forName(DATABIND_MODULE_CLASS_NAME, true, diff --git a/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedWebappClassLoader.java b/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedWebappClassLoader.java index 4a2e92dee1..67ee0ba34e 100644 --- a/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedWebappClassLoader.java +++ b/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatEmbeddedWebappClassLoader.java @@ -27,7 +27,7 @@ import org.apache.commons.logging.LogFactory; /** * Extension of Tomcat's {@link WebappClassLoader} that does not consider the - * {@link ClassLoader#getSystemClassLoader() system classloader}. This is required to to + * {@link ClassLoader#getSystemClassLoader() system classloader}. This is required to * ensure that any custom context classloader is always used (as is the case with some * executable archives). *