You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/04/26 18:29:17 UTC

svn commit: r1330930 - /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/Utils.java

Author: sebb
Date: Thu Apr 26 16:29:17 2012
New Revision: 1330930

URL: http://svn.apache.org/viewvc?rev=1330930&view=rev
Log:
Catch all Exceptions here

Modified:
    commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/Utils.java

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/Utils.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/Utils.java?rev=1330930&r1=1330929&r2=1330930&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/Utils.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/Utils.java Thu Apr 26 16:29:17 2012
@@ -20,7 +20,6 @@ package org.apache.commons.dbcp2;
 
 import java.sql.Connection;
 import java.sql.ResultSet;
-import java.sql.SQLException;
 import java.sql.Statement;
 
 /**
@@ -28,6 +27,10 @@ import java.sql.Statement;
  */
 public class Utils {
 
+    private Utils() {
+        // not instantiable
+    }
+
     /**
      * Closes the ResultSet (which may be null).
      * 
@@ -37,7 +40,7 @@ public class Utils {
         if (rset != null) {
             try {
                 rset.close();
-            } catch (SQLException e) {
+            } catch (Exception e) {
                 // ignored
             }
         }
@@ -52,7 +55,7 @@ public class Utils {
         if (conn != null) {
             try {
                 conn.close();
-            } catch (SQLException e) {
+            } catch (Exception e) {
                 // ignored
             }
         }
@@ -67,7 +70,7 @@ public class Utils {
         if (stmt != null) {
             try {
                 stmt.close();
-            } catch (SQLException e) {
+            } catch (Exception e) {
                 // ignored
             }
         }