diff --git a/spring-context/src/main/java/org/springframework/scripting/config/ScriptingDefaultsParser.java b/spring-context/src/main/java/org/springframework/scripting/config/ScriptingDefaultsParser.java index d80e45827b8..f967a3a6c92 100644 --- a/spring-context/src/main/java/org/springframework/scripting/config/ScriptingDefaultsParser.java +++ b/spring-context/src/main/java/org/springframework/scripting/config/ScriptingDefaultsParser.java @@ -41,7 +41,7 @@ class ScriptingDefaultsParser implements BeanDefinitionParser { LangNamespaceUtils.registerScriptFactoryPostProcessorIfNecessary(parserContext.getRegistry()); String refreshCheckDelay = element.getAttribute(REFRESH_CHECK_DELAY_ATTRIBUTE); if (StringUtils.hasText(refreshCheckDelay)) { - bd.getPropertyValues().add("defaultRefreshCheckDelay", new Long(refreshCheckDelay)); + bd.getPropertyValues().add("defaultRefreshCheckDelay", Long.valueOf(refreshCheckDelay)); } String proxyTargetClass = element.getAttribute(PROXY_TARGET_CLASS_ATTRIBUTE); if (StringUtils.hasText(proxyTargetClass)) { diff --git a/spring-core/src/main/java/org/springframework/asm/Opcodes.java b/spring-core/src/main/java/org/springframework/asm/Opcodes.java index 1f4f4825e4d..a77a939056c 100644 --- a/spring-core/src/main/java/org/springframework/asm/Opcodes.java +++ b/spring-core/src/main/java/org/springframework/asm/Opcodes.java @@ -146,13 +146,13 @@ public interface Opcodes { */ int F_SAME1 = 4; - Integer TOP = new Integer(0); - Integer INTEGER = new Integer(1); - Integer FLOAT = new Integer(2); - Integer DOUBLE = new Integer(3); - Integer LONG = new Integer(4); - Integer NULL = new Integer(5); - Integer UNINITIALIZED_THIS = new Integer(6); + Integer TOP = 0; + Integer INTEGER = 1; + Integer FLOAT = 2; + Integer DOUBLE = 3; + Integer LONG = 4; + Integer NULL = 5; + Integer UNINITIALIZED_THIS = 6; // opcodes // visit method (- = idem) diff --git a/spring-core/src/main/java/org/springframework/core/style/ToStringCreator.java b/spring-core/src/main/java/org/springframework/core/style/ToStringCreator.java index 6f682939cc7..a7291f6f796 100644 --- a/spring-core/src/main/java/org/springframework/core/style/ToStringCreator.java +++ b/spring-core/src/main/java/org/springframework/core/style/ToStringCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 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. @@ -82,7 +82,7 @@ public class ToStringCreator { * @return this, to support call-chaining */ public ToStringCreator append(String fieldName, byte value) { - return append(fieldName, new Byte(value)); + return append(fieldName, Byte.valueOf(value)); } /** @@ -92,7 +92,7 @@ public class ToStringCreator { * @return this, to support call-chaining */ public ToStringCreator append(String fieldName, short value) { - return append(fieldName, new Short(value)); + return append(fieldName, Short.valueOf(value)); } /** @@ -102,7 +102,7 @@ public class ToStringCreator { * @return this, to support call-chaining */ public ToStringCreator append(String fieldName, int value) { - return append(fieldName, new Integer(value)); + return append(fieldName, Integer.valueOf(value)); } /** @@ -112,7 +112,7 @@ public class ToStringCreator { * @return this, to support call-chaining */ public ToStringCreator append(String fieldName, long value) { - return append(fieldName, new Long(value)); + return append(fieldName, Long.valueOf(value)); } /** @@ -122,7 +122,7 @@ public class ToStringCreator { * @return this, to support call-chaining */ public ToStringCreator append(String fieldName, float value) { - return append(fieldName, new Float(value)); + return append(fieldName, Float.valueOf(value)); } /** @@ -132,7 +132,7 @@ public class ToStringCreator { * @return this, to support call-chaining */ public ToStringCreator append(String fieldName, double value) { - return append(fieldName, new Double(value)); + return append(fieldName, Double.valueOf(value)); } /** diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionHolder.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionHolder.java index b34232c138c..26dcbda8ccc 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionHolder.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionHolder.java @@ -161,9 +161,9 @@ public class ConnectionHolder extends ResourceHolderSupport { */ public boolean supportsSavepoints() throws SQLException { if (this.savepointsSupported == null) { - this.savepointsSupported = new Boolean(getConnection().getMetaData().supportsSavepoints()); + this.savepointsSupported = getConnection().getMetaData().supportsSavepoints(); } - return this.savepointsSupported.booleanValue(); + return this.savepointsSupported; } /** diff --git a/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java b/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java index ef03eda9198..9f005d06ed5 100644 --- a/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java +++ b/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 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. @@ -88,7 +88,7 @@ class JcaListenerContainerParser extends AbstractListenerContainerParser { String prefetch = containerEle.getAttribute(PREFETCH_ATTRIBUTE); if (StringUtils.hasText(prefetch)) { - properties.add("prefetchSize", new Integer(prefetch)); + properties.add("prefetchSize", Integer.valueOf(prefetch)); } return properties; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.java index 17d764b91e7..ff698d3160f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.java @@ -46,6 +46,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso /** The default name of the exception attribute: "exception". */ public static final String DEFAULT_EXCEPTION_ATTRIBUTE = "exception"; + private Properties exceptionMappings; private Class[] excludedExceptions; @@ -108,7 +109,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso public void setStatusCodes(Properties statusCodes) { for (Enumeration enumeration = statusCodes.propertyNames(); enumeration.hasMoreElements();) { String viewName = (String) enumeration.nextElement(); - Integer statusCode = new Integer(statusCodes.getProperty(viewName)); + Integer statusCode = Integer.valueOf(statusCodes.getProperty(viewName)); this.statusCodes.put(viewName, statusCode); } }