commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r755385 - in /commons/proper/dbutils/trunk/src: java/org/apache/commons/dbutils/BeanProcessor.java test/org/apache/commons/dbutils/MockResultSet.java test/org/apache/commons/dbutils/MockResultSetMetaData.java
Date Tue, 17 Mar 2009 20:49:43 GMT
Author: sebb
Date: Tue Mar 17 20:49:43 2009
New Revision: 755385

URL: http://svn.apache.org/viewvc?rev=755385&view=rev
Log:
Boolean.valueOf() is more efficient than new Boolean()

Modified:
    commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java
    commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSetMetaData.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=755385&r1=755384&r2=755385&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 Tue
Mar 17 20:49:43 2009
@@ -446,7 +446,7 @@
 
         } else if (
             propType.equals(Boolean.TYPE) || propType.equals(Boolean.class)) {
-            return new Boolean(rs.getBoolean(index));
+            return Boolean.valueOf(rs.getBoolean(index));
 
         } else if (propType.equals(Long.TYPE) || propType.equals(Long.class)) {
             return new Long(rs.getLong(index));

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java?rev=755385&r1=755384&r2=755385&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java (original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java Tue
Mar 17 20:49:43 2009
@@ -313,7 +313,7 @@
             return "MockResultSet " + System.identityHashCode(proxy);
 
         } else if (methodName.equals("equals")) { 
-            return new Boolean(proxy == args[0]); 
+            return Boolean.valueOf(proxy == args[0]); 
         }
 
         throw new UnsupportedOperationException("Unsupported method: " + methodName);

Modified: commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSetMetaData.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSetMetaData.java?rev=755385&r1=755384&r2=755385&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSetMetaData.java
(original)
+++ commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSetMetaData.java
Tue Mar 17 20:49:43 2009
@@ -71,7 +71,7 @@
             return "MockResultSetMetaData " + System.identityHashCode(proxy);
 
         } else if (methodName.equals("equals")) { 
-            return new Boolean(proxy == args[0]); 
+            return Boolean.valueOf(proxy == args[0]); 
 
         } else {
             throw new UnsupportedOperationException("Unsupported method: " + methodName);



Mime
View raw message