提交 e6020ed3 编写于 作者: I igor-suhorukov 提交者: Juergen Hoeller

avoid unnecessary autoboxing

上级 b8d72516
......@@ -82,11 +82,11 @@ public abstract class AopNamespaceUtils {
private static void useClassProxyingIfNecessary(BeanDefinitionRegistry registry, @Nullable Element sourceElement) {
if (sourceElement != null) {
boolean proxyTargetClass = Boolean.valueOf(sourceElement.getAttribute(PROXY_TARGET_CLASS_ATTRIBUTE));
boolean proxyTargetClass = Boolean.parseBoolean(sourceElement.getAttribute(PROXY_TARGET_CLASS_ATTRIBUTE));
if (proxyTargetClass) {
AopConfigUtils.forceAutoProxyCreatorToUseClassProxying(registry);
}
boolean exposeProxy = Boolean.valueOf(sourceElement.getAttribute(EXPOSE_PROXY_ATTRIBUTE));
boolean exposeProxy = Boolean.parseBoolean(sourceElement.getAttribute(EXPOSE_PROXY_ATTRIBUTE));
if (exposeProxy) {
AopConfigUtils.forceAutoProxyCreatorToExposeProxy(registry);
}
......
......@@ -352,7 +352,7 @@ public class CronSequenceGenerator {
if (!split[0].contains("-")) {
range[1] = max - 1;
}
int delta = Integer.valueOf(split[1]);
int delta = Integer.parseInt(split[1]);
if (delta <= 0) {
throw new IllegalArgumentException("Incrementer delta must be 1 or higher: '" +
field + "' in expression \"" + this.expression + "\"");
......
......@@ -76,7 +76,7 @@ class ViewControllerBeanDefinitionParser implements BeanDefinitionParser {
HttpStatus statusCode = null;
if (element.hasAttribute("status-code")) {
int statusValue = Integer.valueOf(element.getAttribute("status-code"));
int statusValue = Integer.parseInt(element.getAttribute("status-code"));
statusCode = HttpStatus.valueOf(statusValue);
}
......
......@@ -121,7 +121,7 @@ public class WebContentInterceptor extends WebContentGenerator implements Handle
Enumeration<?> propNames = cacheMappings.propertyNames();
while (propNames.hasMoreElements()) {
String path = (String) propNames.nextElement();
int cacheSeconds = Integer.valueOf(cacheMappings.getProperty(path));
int cacheSeconds = Integer.parseInt(cacheMappings.getProperty(path));
this.cacheMappings.put(path, cacheSeconds);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册