commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1159869 - /commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java
Date Sat, 20 Aug 2011 10:42:53 GMT
Author: sebb
Date: Sat Aug 20 10:42:53 2011
New Revision: 1159869

URL: http://svn.apache.org/viewvc?rev=1159869&view=rev
Log:
Remove unnecessary cast and boxing warnings

Modified:
    commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java

Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java?rev=1159869&r1=1159868&r2=1159869&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java (original)
+++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java Sat
Aug 20 10:42:53 2011
@@ -65,14 +65,14 @@ public class BeanProcessor {
     private static final Map<Class<?>, Object> primitiveDefaults = new HashMap<Class<?>,
Object>();
 
     static {
-        primitiveDefaults.put(Integer.TYPE, 0);
-        primitiveDefaults.put(Short.TYPE, (Short)((short) 0));
-        primitiveDefaults.put(Byte.TYPE, (Byte)((byte) 0));
-        primitiveDefaults.put(Float.TYPE, (Float)(float)(0));
-        primitiveDefaults.put(Double.TYPE, (Double)(double)(0));
-        primitiveDefaults.put(Long.TYPE, (Long)(0L));
+        primitiveDefaults.put(Integer.TYPE, Integer.valueOf(0));
+        primitiveDefaults.put(Short.TYPE, Short.valueOf((short) 0));
+        primitiveDefaults.put(Byte.TYPE, Byte.valueOf((byte) 0));
+        primitiveDefaults.put(Float.TYPE, Float.valueOf(0f));
+        primitiveDefaults.put(Double.TYPE, Double.valueOf(0d));
+        primitiveDefaults.put(Long.TYPE, Long.valueOf(0L));
         primitiveDefaults.put(Boolean.TYPE, Boolean.FALSE);
-        primitiveDefaults.put(Character.TYPE, '\u0000');
+        primitiveDefaults.put(Character.TYPE, Character.valueOf((char) 0));
     }
 
     /**



Mime
View raw message