commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1227599 - /commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/BeanProcessor.java
Date Thu, 05 Jan 2012 14:07:56 GMT
Author: simonetripodi
Date: Thu Jan  5 14:07:56 2012
New Revision: 1227599

URL: http://svn.apache.org/viewvc?rev=1227599&view=rev
Log:
expected values first

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

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/BeanProcessor.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/BeanProcessor.java?rev=1227599&r1=1227598&r2=1227599&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/BeanProcessor.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/BeanProcessor.java
Thu Jan  5 14:07:56 2012
@@ -235,13 +235,13 @@ public class BeanProcessor {
         try {
             // convert types for some popular ones
             if (value != null && value instanceof java.util.Date) {
-                if (params[0].getName().equals("java.sql.Date")) {
+                if ("java.sql.Date".equals(params[0].getName())) {
                     value = new java.sql.Date(((java.util.Date) value).getTime());
                 } else
-                if (params[0].getName().equals("java.sql.Time")) {
+                if ("java.sql.Time".equals(params[0].getName())) {
                     value = new java.sql.Time(((java.util.Date) value).getTime());
                 } else
-                if (params[0].getName().equals("java.sql.Timestamp")) {
+                if ("java.sql.Timestamp".equals(params[0].getName())) {
                     value = new java.sql.Timestamp(((java.util.Date) value).getTime());
                 }
             }



Mime
View raw message