From 8038882d46e3a3f9eb78c3f0993c68edf25cd280 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Wed, 16 Nov 2016 22:26:39 +0900 Subject: [PATCH] Polish Closes gh-7403 --- .../boot/actuate/endpoint/mvc/NamedMvcEndpoint.java | 2 +- .../boot/autoconfigure/jooq/JooqExceptionTranslator.java | 2 +- .../condition/ConditionalOnCloudPlatformTests.java | 8 ++++++++ .../autoconfigure/web/WebMvcAutoConfigurationTests.java | 2 +- .../src/main/asciidoc/production-ready-features.adoc | 4 ++-- .../src/main/asciidoc/spring-boot-features.adoc | 2 +- spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc | 2 +- .../spring-boot-sample-test-nomockito/pom.xml | 1 + .../testnomockito/SampleTestNoMockitoApplicationTest.java | 2 +- .../org/springframework/boot/loader/tools/RunProcess.java | 4 ++-- .../boot/loader/archive/ExplodedArchive.java | 2 +- .../org/springframework/boot/maven/AbstractRunMojo.java | 2 +- 12 files changed, 21 insertions(+), 12 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/NamedMvcEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/NamedMvcEndpoint.java index 87e9a59188..f92fb0eecf 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/NamedMvcEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/NamedMvcEndpoint.java @@ -17,7 +17,7 @@ package org.springframework.boot.actuate.endpoint.mvc; /** - * A {@link MvcEndpoint} that also includes a logical name. Unlike {@link #getPath() + * An {@link MvcEndpoint} that also includes a logical name. Unlike {@link #getPath() * endpoints paths}, it should not be possible for a user to change the endpoint name. * Names provide a consistent way to reference an endpoint, for example they may be used * as the {@literal 'rel'} attribute in a HAL response. diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jooq/JooqExceptionTranslator.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jooq/JooqExceptionTranslator.java index d1f9de3913..778f83df54 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jooq/JooqExceptionTranslator.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jooq/JooqExceptionTranslator.java @@ -30,7 +30,7 @@ import org.springframework.jdbc.support.SQLExceptionTranslator; import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator; /** - * Transforms {@link java.sql.SQLException} into a Spring-specific @{link + * Transforms {@link java.sql.SQLException} into a Spring-specific {@link * DataAccessException}. * * @author Lukas Eder diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnCloudPlatformTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnCloudPlatformTests.java index f2de5088d2..9d9aa5a5a0 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnCloudPlatformTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnCloudPlatformTests.java @@ -16,6 +16,7 @@ package org.springframework.boot.autoconfigure.condition; +import org.junit.After; import org.junit.Test; import org.springframework.boot.cloud.CloudPlatform; @@ -33,6 +34,13 @@ public class ConditionalOnCloudPlatformTests { private final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); + @After + public void cleanUp() { + if (this.context != null) { + this.context.close(); + } + } + @Test public void outcomeWhenCloudfoundryPlatformNotPresentShouldNotMatch() throws Exception { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfigurationTests.java index 9b17db8c2f..478772ba3a 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfigurationTests.java @@ -577,7 +577,7 @@ public class WebMvcAutoConfigurationTests { } @Test - public void welcomePageMappingDoesNotHandleRequestThatDoNotAcceptTextHtml() + public void welcomePageMappingDoesNotHandleRequestsThatDoNotAcceptTextHtml() throws Exception { load("spring.resources.static-locations:classpath:/welcome-page/"); assertThat(this.context.getBeansOfType(WelcomePageHandlerMapping.class)) diff --git a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 1a78e186db..52d5256dca 100644 --- a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -953,7 +953,7 @@ documentation]. == Loggers Spring Boot Actuator includes the ability to view and configure the log levels of your application at runtime. You can view either the entire list or an individual logger's -configuration which is made up of both the explictily configured logging level as well as +configuration which is made up of both the explicitly configured logging level as well as the effective logging level given to it by the logging framework. These levels can be: * `TRACE` @@ -965,7 +965,7 @@ the effective logging level given to it by the logging framework. These levels * `OFF` * `null` -with `null` indicating that there is no explict configuration. +with `null` indicating that there is no explicit configuration. 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 fd53aae9e8..5219cc0510 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -3886,7 +3886,7 @@ abstraction expects. No further customization is applied on it. EhCache 2.x is used if a file named `ehcache.xml` can be found at the root of the classpath. If EhCache 2.x, the `EhCacheCacheManager` provided by the `spring-boot-starter-cache` '`Starter`' and such file is present it is used to bootstrap -the cache manager. An alternate configuration file can be provide a well using: +the cache manager. An alternate configuration file can be provided as well using: [source,properties,indent=0] ---- diff --git a/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc b/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc index 608f83a09b..00b0b781ef 100644 --- a/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc +++ b/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc @@ -769,7 +769,7 @@ dependencies out-of-the-box so you may want to have a look to the {propdeps-plugin}[`propdeps-plugin`] in the meantime. TIP: repackaged archives do not contain devtools by default. If you want to use -<>, you'll need to enable the +<>, you'll need to disable the `excludeDevtools` build property to include it. The property is supported with both the Maven and Gradle plugins. diff --git a/spring-boot-samples/spring-boot-sample-test-nomockito/pom.xml b/spring-boot-samples/spring-boot-sample-test-nomockito/pom.xml index b069b69fa5..d97548d047 100644 --- a/spring-boot-samples/spring-boot-sample-test-nomockito/pom.xml +++ b/spring-boot-samples/spring-boot-sample-test-nomockito/pom.xml @@ -42,6 +42,7 @@ org.assertj assertj-core + test diff --git a/spring-boot-samples/spring-boot-sample-test-nomockito/src/test/java/sample/testnomockito/SampleTestNoMockitoApplicationTest.java b/spring-boot-samples/spring-boot-sample-test-nomockito/src/test/java/sample/testnomockito/SampleTestNoMockitoApplicationTest.java index 589bb0c4f1..70e89a1f24 100644 --- a/spring-boot-samples/spring-boot-sample-test-nomockito/src/test/java/sample/testnomockito/SampleTestNoMockitoApplicationTest.java +++ b/spring-boot-samples/spring-boot-sample-test-nomockito/src/test/java/sample/testnomockito/SampleTestNoMockitoApplicationTest.java @@ -10,7 +10,7 @@ import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; /** - * Tests that {code ResetMocksTestExecutionListener} and + * Tests that {@code ResetMocksTestExecutionListener} and * {@code MockitoTestExecutionListener} gracefully degrade when Mockito is not on the * classpath. * diff --git a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/RunProcess.java b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/RunProcess.java index 6cc20a4e44..ef6f62f8b3 100644 --- a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/RunProcess.java +++ b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/RunProcess.java @@ -52,7 +52,7 @@ public class RunProcess { /** * Creates new {@link RunProcess} instance for the specified command. - * @param command the program to execute and it's arguments + * @param command the program to execute and its arguments */ public RunProcess(String... command) { this(null, command); @@ -63,7 +63,7 @@ public class RunProcess { * command. * @param workingDirectory the working directory of the child process or {@code null} * to run in the working directory of the current Java process - * @param command the program to execute and it's arguments + * @param command the program to execute and its arguments */ public RunProcess(File workingDirectory, String... command) { this.workingDirectory = workingDirectory; diff --git a/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/ExplodedArchive.java b/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/ExplodedArchive.java index 5f6b8fb63e..6efca10a31 100644 --- a/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/ExplodedArchive.java +++ b/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/ExplodedArchive.java @@ -65,7 +65,7 @@ public class ExplodedArchive implements Archive { * Create a new {@link ExplodedArchive} instance. * @param root the root folder * @param recursive if recursive searching should be used to locate the manifest. - * Defaults to {@code true}, folders with a large tree might want to set this to {code + * Defaults to {@code true}, folders with a large tree might want to set this to {@code * false}. */ public ExplodedArchive(File root, boolean recursive) { diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java index b22b1b7e57..dc08eff497 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java @@ -89,7 +89,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo { /** * Current working directory to use for the application. If not specified, basedir - * will be used NOTE: the use of working directory means that processes will be + * will be used. NOTE: the use of working directory means that processes will be * started by forking a new JVM. * @since 1.5 */