Use Integer.valueOf() in preference to new Integer()
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user