Polish
Closes gh-8526
This commit is contained in:
committed by
Stephane Nicoll
parent
8f903987da
commit
709ee23255
@@ -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<String> getNamesForAnnotation(Class<? extends Annotation> 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 == ':');
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user