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/dbutils/src/java/org/apache/commons/dbutils QueryRunner.java
Date Mon, 03 Nov 2003 00:38:21 GMT
dgraham     2003/11/02 16:38:21

  Modified:    dbutils/src/java/org/apache/commons/dbutils QueryRunner.java
  Log:
  Replace calls to closeQuietly() with close().  QueryRunner
  shouldn't suppress any exceptions.
  
  Revision  Changes    Path
  1.2       +9 -8      jakarta-commons/dbutils/src/java/org/apache/commons/dbutils/QueryRunner.java
  
  Index: QueryRunner.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbutils/src/java/org/apache/commons/dbutils/QueryRunner.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- QueryRunner.java	2 Nov 2003 19:15:23 -0000	1.1
  +++ QueryRunner.java	3 Nov 2003 00:38:21 -0000	1.2
  @@ -213,8 +213,8 @@
               this.rethrow(e, sql, params);
   
           } finally {
  -            DbUtils.closeQuietly(rs);
  -            DbUtils.closeQuietly(stmt);
  +            DbUtils.close(rs);
  +            DbUtils.close(stmt);
           }
   
           return result;
  @@ -281,7 +281,7 @@
               result = this.query(conn, sql, params, rsh);
   
           } finally {
  -            DbUtils.closeQuietly(conn);
  +            DbUtils.close(conn);
           }
   
           return result;
  @@ -320,6 +320,7 @@
   
           StringBuffer msg =
               new StringBuffer(cause.getMessage() + " in query " + sql);
  +            
           if (params != null) {
               msg.append(Arrays.asList(params).toString());
           }
  @@ -396,7 +397,7 @@
               this.rethrow(e, sql, params);
   
           } finally {
  -            DbUtils.closeQuietly(stmt);
  +            DbUtils.close(stmt);
           }
   
           return rows;
  @@ -461,7 +462,7 @@
               throw e;
   
           } finally {
  -            DbUtils.closeQuietly(conn);
  +            DbUtils.close(conn);
           }
   
           return rows;
  
  
  

---------------------------------------------------------------------
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