Polish: do simple clean-up
This commit is contained in:
parent
cb4d6f097c
commit
60b72d721d
|
|
@ -156,8 +156,7 @@ public abstract class YamlProcessor {
|
|||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Loading from YAML: " + resource);
|
||||
}
|
||||
Reader reader = new UnicodeReader(resource.getInputStream());
|
||||
try {
|
||||
try (Reader reader = new UnicodeReader(resource.getInputStream())) {
|
||||
for (Object object : yaml.loadAll(reader)) {
|
||||
if (object != null && process(asMap(object), callback)) {
|
||||
count++;
|
||||
|
|
@ -171,9 +170,6 @@ public abstract class YamlProcessor {
|
|||
" from YAML resource: " + resource);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
reader.close();
|
||||
}
|
||||
}
|
||||
catch (IOException ex) {
|
||||
handleProcessError(resource, ex);
|
||||
|
|
|
|||
|
|
@ -663,7 +663,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
|
|||
* Return whether this bean has the specified qualifier.
|
||||
*/
|
||||
public boolean hasQualifier(String typeName) {
|
||||
return this.qualifiers.keySet().contains(typeName);
|
||||
return this.qualifiers.containsKey(typeName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ public class StompDecoder {
|
|||
if (index + 1 >= inString.length()) {
|
||||
throw new StompConversionException("Illegal escape sequence at index " + index + ": " + inString);
|
||||
}
|
||||
Character c = inString.charAt(index + 1);
|
||||
char c = inString.charAt(index + 1);
|
||||
if (c == 'r') {
|
||||
sb.append('\r');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue