You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by dg...@apache.org on 2003/11/03 01:22:57 UTC
cvs commit: jakarta-commons/dbutils/src/java/org/apache/commons/dbutils DbUtils.java
dgraham 2003/11/02 16:22:57
Modified: dbutils/src/java/org/apache/commons/dbutils DbUtils.java
Log:
Updated javadoc to indicate closeQuietly() only hides
SQLExceptions.
Revision Changes Path
1.2 +9 -8 jakarta-commons/dbutils/src/java/org/apache/commons/dbutils/DbUtils.java
Index: DbUtils.java
===================================================================
RCS file: /home/cvs/jakarta-commons/dbutils/src/java/org/apache/commons/dbutils/DbUtils.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DbUtils.java 2 Nov 2003 19:15:23 -0000 1.1
+++ DbUtils.java 3 Nov 2003 00:22:57 -0000 1.2
@@ -106,7 +106,7 @@
/**
* Close a <code>Connection</code>, avoid closing if null and hide
- * any exceptions that occur.
+ * any SQLExceptions that occur.
*/
public static void closeQuietly(Connection conn) {
try {
@@ -119,12 +119,13 @@
/**
* Close a <code>Connection</code>, <code>Statement</code> and
* <code>ResultSet</code>. Avoid closing if null and hide any
- * exceptions that occur.
+ * SQLExceptions that occur.
*/
public static void closeQuietly(
Connection conn,
Statement stmt,
ResultSet rs) {
+
closeQuietly(rs);
closeQuietly(stmt);
closeQuietly(conn);
@@ -132,7 +133,7 @@
/**
* Close a <code>ResultSet</code>, avoid closing if null and hide
- * any exceptions that occur.
+ * any SQLExceptions that occur.
*/
public static void closeQuietly(ResultSet rs) {
try {
@@ -144,7 +145,7 @@
/**
* Close a <code>Statement</code>, avoid closing if null and hide
- * any exceptions that occur.
+ * any SQLExceptions that occur.
*/
public static void closeQuietly(Statement stmt) {
try {
@@ -166,7 +167,7 @@
/**
* Commits a <code>Connection</code> then closes it, avoid closing if null
- * and hide any exceptions that occur.
+ * and hide any SQLExceptions that occur.
*/
public static void commitAndCloseQuietly(Connection conn) {
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org