Skip to content

Commit e6020ed

Browse files
igor-suhorukovjhoeller
authored andcommitted
avoid unnecessary autoboxing
1 parent b8d7251 commit e6020ed

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ public static void registerAspectJAnnotationAutoProxyCreatorIfNecessary(
8282

8383
private static void useClassProxyingIfNecessary(BeanDefinitionRegistry registry, @Nullable Element sourceElement) {
8484
if (sourceElement != null) {
85-
boolean proxyTargetClass = Boolean.valueOf(sourceElement.getAttribute(PROXY_TARGET_CLASS_ATTRIBUTE));
85+
boolean proxyTargetClass = Boolean.parseBoolean(sourceElement.getAttribute(PROXY_TARGET_CLASS_ATTRIBUTE));
8686
if (proxyTargetClass) {
8787
AopConfigUtils.forceAutoProxyCreatorToUseClassProxying(registry);
8888
}
89-
boolean exposeProxy = Boolean.valueOf(sourceElement.getAttribute(EXPOSE_PROXY_ATTRIBUTE));
89+
boolean exposeProxy = Boolean.parseBoolean(sourceElement.getAttribute(EXPOSE_PROXY_ATTRIBUTE));
9090
if (exposeProxy) {
9191
AopConfigUtils.forceAutoProxyCreatorToExposeProxy(registry);
9292
}

spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ private void setNumberHits(BitSet bits, String value, int min, int max) {
352352
if (!split[0].contains("-")) {
353353
range[1] = max - 1;
354354
}
355-
int delta = Integer.valueOf(split[1]);
355+
int delta = Integer.parseInt(split[1]);
356356
if (delta <= 0) {
357357
throw new IllegalArgumentException("Incrementer delta must be 1 or higher: '" +
358358
field + "' in expression \"" + this.expression + "\"");

spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public BeanDefinition parse(Element element, ParserContext parserContext) {
7676

7777
HttpStatus statusCode = null;
7878
if (element.hasAttribute("status-code")) {
79-
int statusValue = Integer.valueOf(element.getAttribute("status-code"));
79+
int statusValue = Integer.parseInt(element.getAttribute("status-code"));
8080
statusCode = HttpStatus.valueOf(statusValue);
8181
}
8282

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void setCacheMappings(Properties cacheMappings) {
121121
Enumeration<?> propNames = cacheMappings.propertyNames();
122122
while (propNames.hasMoreElements()) {
123123
String path = (String) propNames.nextElement();
124-
int cacheSeconds = Integer.valueOf(cacheMappings.getProperty(path));
124+
int cacheSeconds = Integer.parseInt(cacheMappings.getProperty(path));
125125
this.cacheMappings.put(path, cacheSeconds);
126126
}
127127
}

0 commit comments

Comments
 (0)