commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgra...@apache.org
Subject cvs commit: jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils BasicResultSetConverter.java
Date Fri, 17 Oct 2003 23:52:18 GMT
dgraham     2003/10/17 16:52:18

  Modified:    dbutils/src/java/org/apache/commons/dbutils
                        BasicResultSetConverter.java
  Log:
  Remove null check from toMap().  The query requested n number of 
  columns so the Map should have the same number of key/value pairs.
  
  Revision  Changes    Path
  1.7       +4 -7      jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/BasicResultSetConverter.java
  
  Index: BasicResultSetConverter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/BasicResultSetConverter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- BasicResultSetConverter.java	17 Oct 2003 23:48:58 -0000	1.6
  +++ BasicResultSetConverter.java	17 Oct 2003 23:52:18 -0000	1.7
  @@ -236,10 +236,7 @@
           int cols = rsmd.getColumnCount();
   
           for (int i = 1; i <= cols; i++) {
  -            Object value = rs.getObject(i);
  -            if (!rs.wasNull()) {
  -                result.put(rsmd.getColumnName(i), value);
  -            }
  +            result.put(rsmd.getColumnName(i), rs.getObject(i));
           }
   
           return result;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message