Author: sebb
Date: Tue Mar 13 09:41:08 2012
New Revision: 1300033

URL: http://svn.apache.org/viewvc?rev=1300033&view=rev
Log:
Findbugs: more efficient to use valueOf

Modified:
    
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ExtendedProperties.java

Modified: 
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ExtendedProperties.java
URL: 
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ExtendedProperties.java?rev=1300033&r1=1300032&r2=1300033&view=diff
==============================================================================
--- 
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ExtendedProperties.java
 (original)
+++ 
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/ExtendedProperties.java
 Tue Mar 13 09:41:08 2012
@@ -1179,7 +1179,7 @@ public class ExtendedProperties extends 
      * object that is not a Boolean.
      */
     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 
      * by the key has not a valid number format.
      */
     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 
      * by the key has not a valid number format.
      */
     public short getShort(String key, short defaultValue) {
-        return getShort(key, new Short(defaultValue)).shortValue();
+        return getShort(key, Short.valueOf(defaultValue)).shortValue();
     }
 
     /**


Reply via email to