Findbugs: more efficient to use valueOf

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1300033 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-03-13 09:41:08 +00:00
parent 829da75d82
commit 3545b25d59
1 changed files with 3 additions and 3 deletions

View File

@ -1179,7 +1179,7 @@ public class ExtendedProperties extends Hashtable<String, Object> {
* object that is not a Boolean. * object that is not a Boolean.
*/ */
public boolean getBoolean(String key, boolean defaultValue) { public boolean getBoolean(String key, boolean defaultValue) {
return getBoolean(key, new Boolean(defaultValue)).booleanValue(); return getBoolean(key, Boolean.valueOf(defaultValue)).booleanValue();
} }
/** /**
@ -1273,7 +1273,7 @@ public class ExtendedProperties extends Hashtable<String, Object> {
* by the key has not a valid number format. * by the key has not a valid number format.
*/ */
public byte getByte(String key, byte defaultValue) { public byte getByte(String key, byte defaultValue) {
return getByte(key, new Byte(defaultValue)).byteValue(); return getByte(key, Byte.valueOf(defaultValue)).byteValue();
} }
/** /**
@ -1343,7 +1343,7 @@ public class ExtendedProperties extends Hashtable<String, Object> {
* by the key has not a valid number format. * by the key has not a valid number format.
*/ */
public short getShort(String key, short defaultValue) { public short getShort(String key, short defaultValue) {
return getShort(key, new Short(defaultValue)).shortValue(); return getShort(key, Short.valueOf(defaultValue)).shortValue();
} }
/** /**