From e0de28a1f7cd42d76a71f1b1ab0527938417b975 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Tue, 24 Jan 2017 20:39:36 +0900 Subject: [PATCH] Polish Closes gh-8076 --- .../springframework/boot/actuate/audit/AuditEventTests.java | 1 - .../boot/autoconfigure/condition/OnClassCondition.java | 6 +++--- spring-boot-docs/src/main/asciidoc/howto.adoc | 2 +- .../src/main/asciidoc/spring-boot-features.adoc | 2 +- .../AutoConfigureAnnotationProcessorTests.java | 2 +- ...r.java => TestConditionMetadataAnnotationProcessor.java} | 4 ++-- .../autoconfigureprocessor/TestMethodConfiguration.java | 2 +- 7 files changed, 9 insertions(+), 10 deletions(-) rename spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/{TestConditionMetdataAnnotationProcessor.java => TestConditionMetadataAnnotationProcessor.java} (95%) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/AuditEventTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/AuditEventTests.java index 1665a9353a..cbe594722f 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/AuditEventTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/AuditEventTests.java @@ -83,7 +83,6 @@ public class AuditEventTests { Collections.singletonMap("type", (Object) "BadCredentials")); String json = Jackson2ObjectMapperBuilder.json().build() .writeValueAsString(event); - System.out.println(json); JSONObject jsonObject = new JSONObject(json); assertThat(jsonObject.getString("type")).isEqualTo("UNKNOWN"); assertThat(jsonObject.getJSONObject("data").getString("type")) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnClassCondition.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnClassCondition.java index e838c95adf..c97cf6757c 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnClassCondition.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnClassCondition.java @@ -196,10 +196,10 @@ class OnClassCondition extends SpringBootCondition } } - private List getMatches(Collection candiates, MatchType matchType, + private List getMatches(Collection candidates, MatchType matchType, ClassLoader classLoader) { - List matches = new ArrayList(candiates.size()); - for (String candidate : candiates) { + List matches = new ArrayList(candidates.size()); + for (String candidate : candidates) { if (matchType.matches(candidate, classLoader)) { matches.add(candidate); } diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index b5aa633710..f179a6634d 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -2186,7 +2186,7 @@ application starts for testing. If you want to be more sophisticated you can use profile-specific configuration to customize `flyway.locations` so that certain migrations will only run when a particular profile is active. For example, in `application-dev.properties` you could set `flyway.locations` to -`classpath:/db/migration, claspath:/dev/db/migration` and migrations in `dev/db/migration` +`classpath:/db/migration, classpath:/dev/db/migration` and migrations in `dev/db/migration` will only run when the `dev` profile is active. 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 5af71c25c2..d1805c2971 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1579,7 +1579,7 @@ it's loaded too early. You need to either use `logback-spring.xml` or define a WARNING: The extensions cannot be used with Logback's http://logback.qos.ch/manual/configuration.html#autoScan[configuration scanning]. If you attempt to do so, making changes to the configuration file will result in an error similar -to once of the following being logged: +to one of the following being logged: ---- ERROR in ch.qos.logback.core.joran.spi.Interpreter@4:71 - no applicable action for [springProperty], current ElementPath is [[configuration][springProperty]] diff --git a/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java b/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java index 26d4744e93..7336153480 100644 --- a/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java +++ b/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/AutoConfigureAnnotationProcessorTests.java @@ -108,7 +108,7 @@ public class AutoConfigureAnnotationProcessorTests { } private Properties compile(Class... types) throws IOException { - TestConditionMetdataAnnotationProcessor processor = new TestConditionMetdataAnnotationProcessor( + TestConditionMetadataAnnotationProcessor processor = new TestConditionMetadataAnnotationProcessor( this.compiler.getOutputLocation()); this.compiler.getTask(types).call(processor); return processor.getWrittenProperties(); diff --git a/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestConditionMetdataAnnotationProcessor.java b/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestConditionMetadataAnnotationProcessor.java similarity index 95% rename from spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestConditionMetdataAnnotationProcessor.java rename to spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestConditionMetadataAnnotationProcessor.java index 08d0c60d15..9d7830ceed 100644 --- a/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestConditionMetdataAnnotationProcessor.java +++ b/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestConditionMetadataAnnotationProcessor.java @@ -35,12 +35,12 @@ import javax.annotation.processing.SupportedAnnotationTypes; "org.springframework.boot.autoconfigureprocessor.TestAutoConfigureBefore", "org.springframework.boot.autoconfigureprocessor.TestAutoConfigureAfter", "org.springframework.boot.autoconfigureprocessor.TestAutoConfigureOrder" }) -public class TestConditionMetdataAnnotationProcessor +public class TestConditionMetadataAnnotationProcessor extends AutoConfigureAnnotationProcessor { private final File outputLocation; - public TestConditionMetdataAnnotationProcessor(File outputLocation) { + public TestConditionMetadataAnnotationProcessor(File outputLocation) { this.outputLocation = outputLocation; } diff --git a/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestMethodConfiguration.java b/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestMethodConfiguration.java index d2fe126d0c..3793b857c0 100644 --- a/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestMethodConfiguration.java +++ b/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestMethodConfiguration.java @@ -19,7 +19,7 @@ package org.springframework.boot.autoconfigureprocessor; import java.io.OutputStream; /** - * Test configuration with an annoated method. + * Test configuration with an annotated method. * * @author Madhura Bhave */