avoid unnecessary autoboxing

This commit is contained in:
igor-suhorukov
2018-03-29 00:22:37 +03:00
committed by Juergen Hoeller
parent b8d72516e1
commit e6020ed377
4 changed files with 5 additions and 5 deletions

View File

@@ -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);
}

View File

@@ -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);
}
}