From 709ee23255a031f76e8c45f0aa9f309f7f5e6762 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Tue, 7 Mar 2017 23:57:46 +0900 Subject: [PATCH] Polish Closes gh-8526 --- .../boot/autoconfigure/condition/BeanTypeRegistry.java | 6 +++--- .../boot/env/OriginTrackedPropertiesLoader.java | 10 +++++----- .../boot/env/TextResourcePropertyOrigin.java | 2 +- .../boot/env/TextResourcePropertyOriginTests.java | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/BeanTypeRegistry.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/BeanTypeRegistry.java index b750d162fb..80b83a9f23 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/BeanTypeRegistry.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/BeanTypeRegistry.java @@ -127,7 +127,7 @@ final class BeanTypeRegistry implements SmartInitializingSingleton { * the case of {@link FactoryBean FactoryBeans}. Will include singletons but will not * cause early bean initialization. * @param annotation the annotation to match (must not be {@code null}) - * @return the names of beans (or objects created by FactoryBeans) annoated with the + * @return the names of beans (or objects created by FactoryBeans) annotated with the * given annotation, or an empty set if none */ Set getNamesForAnnotation(Class annotation) { @@ -188,8 +188,8 @@ final class BeanTypeRegistry implements SmartInitializingSingleton { } private void logIgnoredError(String message, String name, Exception ex) { - if (BeanTypeRegistry.logger.isDebugEnabled()) { - BeanTypeRegistry.logger.debug("Ignoring " + message + " '" + name + "'", ex); + if (logger.isDebugEnabled()) { + logger.debug("Ignoring " + message + " '" + name + "'", ex); } } diff --git a/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedPropertiesLoader.java b/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedPropertiesLoader.java index 8ecdca3ef7..2508fd6938 100644 --- a/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedPropertiesLoader.java +++ b/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedPropertiesLoader.java @@ -61,7 +61,7 @@ class OriginTrackedPropertiesLoader { /** * Load {@code .properties} data and return a map of {@code String} -> * {@link OriginTrackedValue}. - * @param expandLists if list {@code name[]=a,b,c} shorcuts should be expanded + * @param expandLists if list {@code name[]=a,b,c} shortcuts should be expanded * @return the loaded properties * @throws IOException on read error */ @@ -104,7 +104,7 @@ class OriginTrackedPropertiesLoader { buffer.setLength(0); boolean previousWhitespace = false; while (!reader.isEndOfLine()) { - if (reader.isPropertyDelimeter()) { + if (reader.isPropertyDelimiter()) { reader.read(); return buffer.toString(); } @@ -125,7 +125,7 @@ class OriginTrackedPropertiesLoader { reader.read(); } Location location = reader.getLocation(); - while (!reader.isEndOfLine() && !(splitLists && reader.isListDelimeter())) { + while (!reader.isEndOfLine() && !(splitLists && reader.isListDelimiter())) { buffer.append(reader.getCharacter()); reader.read(); } @@ -241,11 +241,11 @@ class OriginTrackedPropertiesLoader { return this.character == -1 || (!this.escaped && this.character == '\n'); } - public boolean isListDelimeter() { + public boolean isListDelimiter() { return !this.escaped && this.character == ','; } - public boolean isPropertyDelimeter() { + public boolean isPropertyDelimiter() { return !this.escaped && (this.character == '=' || this.character == ':'); } diff --git a/spring-boot/src/main/java/org/springframework/boot/env/TextResourcePropertyOrigin.java b/spring-boot/src/main/java/org/springframework/boot/env/TextResourcePropertyOrigin.java index 6ac740a9c1..dbe4246f1f 100644 --- a/spring-boot/src/main/java/org/springframework/boot/env/TextResourcePropertyOrigin.java +++ b/spring-boot/src/main/java/org/springframework/boot/env/TextResourcePropertyOrigin.java @@ -21,7 +21,7 @@ import org.springframework.util.ObjectUtils; /** * {@link PropertyOrigin} for an item loaded from a text resource. Provides access to the - * origina {@link Resource} that loaded the text and a {@link Location} within it. + * original {@link Resource} that loaded the text and a {@link Location} within it. * * @author Madhura Bhave * @author Phillip Webb diff --git a/spring-boot/src/test/java/org/springframework/boot/env/TextResourcePropertyOriginTests.java b/spring-boot/src/test/java/org/springframework/boot/env/TextResourcePropertyOriginTests.java index 21d76f1502..3750847359 100644 --- a/spring-boot/src/test/java/org/springframework/boot/env/TextResourcePropertyOriginTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/env/TextResourcePropertyOriginTests.java @@ -103,7 +103,7 @@ public class TextResourcePropertyOriginTests { } @Test - public void locationEqualsAndHashcodeShouldUseLineAndColumn() throws Exception { + public void locationEqualsAndHashCodeShouldUseLineAndColumn() throws Exception { Location location1 = new Location(1, 2); Location location2 = new Location(1, 2); Location location3 = new Location(2, 2);