1
0
mirror of synced 2026-08-05 17:57:15 +00:00

Use Integer.valueOf() in preference to new Integer()

This commit is contained in:
Luke Taylor
2010-08-11 18:17:23 +01:00
parent db6da77a5f
commit 2222a7be07
18 changed files with 49 additions and 43 deletions
@@ -93,7 +93,7 @@ public class PasswordEncoderParser {
BeanDefinitionBuilder beanBldr = BeanDefinitionBuilder.rootBeanDefinition(beanClass);
if (OPT_HASH_SHA256.equals(hash)) {
beanBldr.addConstructorArgValue(new Integer(256));
beanBldr.addConstructorArgValue(Integer.valueOf(256));
}
if (useBase64) {
@@ -100,7 +100,7 @@ class RememberMeBeanDefinitionParser implements BeanDefinitionParser {
}
if (tokenValiditySet) {
Integer tokenValidity = new Integer(tokenValiditySeconds);
Integer tokenValidity = Integer.valueOf(tokenValiditySeconds);
if (tokenValidity.intValue() < 0 && isPersistent) {
pc.getReaderContext().error(ATT_TOKEN_VALIDITY + " cannot be negative if using" +
" a persistent remember-me token repository", source);