@@ -149,7 +149,7 @@ public class ConcurrentMapCache extends AbstractValueAdaptingCache {
|
||||
try {
|
||||
value = valueLoader.call();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
catch (Throwable ex) {
|
||||
throw new ValueRetrievalException(key, valueLoader, ex);
|
||||
}
|
||||
put(key, value);
|
||||
|
||||
@@ -266,7 +266,7 @@ public class ClassPathScanningCandidateComponentProvider implements EnvironmentC
|
||||
Set<BeanDefinition> candidates = new LinkedHashSet<BeanDefinition>();
|
||||
try {
|
||||
String packageSearchPath = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX +
|
||||
resolveBasePackage(basePackage) + "/" + this.resourcePattern;
|
||||
resolveBasePackage(basePackage) + '/' + this.resourcePattern;
|
||||
Resource[] resources = this.resourcePatternResolver.getResources(packageSearchPath);
|
||||
boolean traceEnabled = logger.isTraceEnabled();
|
||||
boolean debugEnabled = logger.isDebugEnabled();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -142,7 +142,7 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
|
||||
group.add(entry.getKey(), bean);
|
||||
}
|
||||
}
|
||||
if (phases.size() > 0) {
|
||||
if (!phases.isEmpty()) {
|
||||
List<Integer> keys = new ArrayList<Integer>(phases.keySet());
|
||||
Collections.sort(keys);
|
||||
for (Integer key : keys) {
|
||||
@@ -195,7 +195,7 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
|
||||
}
|
||||
group.add(entry.getKey(), bean);
|
||||
}
|
||||
if (phases.size() > 0) {
|
||||
if (!phases.isEmpty()) {
|
||||
List<Integer> keys = new ArrayList<Integer>(phases.keySet());
|
||||
Collections.sort(keys, Collections.reverseOrder());
|
||||
for (Integer key : keys) {
|
||||
|
||||
@@ -43,12 +43,12 @@ public class StaticMessageSource extends AbstractMessageSource {
|
||||
|
||||
@Override
|
||||
protected String resolveCodeWithoutArguments(String code, Locale locale) {
|
||||
return this.messages.get(code + "_" + locale.toString());
|
||||
return this.messages.get(code + '_' + locale.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MessageFormat resolveCode(String code, Locale locale) {
|
||||
String key = code + "_" + locale.toString();
|
||||
String key = code + '_' + locale.toString();
|
||||
String msg = this.messages.get(key);
|
||||
if (msg == null) {
|
||||
return null;
|
||||
@@ -73,7 +73,7 @@ public class StaticMessageSource extends AbstractMessageSource {
|
||||
Assert.notNull(code, "Code must not be null");
|
||||
Assert.notNull(locale, "Locale must not be null");
|
||||
Assert.notNull(msg, "Message must not be null");
|
||||
this.messages.put(code + "_" + locale.toString(), msg);
|
||||
this.messages.put(code + '_' + locale.toString(), msg);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Added message [" + msg + "] for code [" + code + "] and Locale [" + locale + "]");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user