commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r830170 - /commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingConnection.java
Date Tue, 27 Oct 2009 13:28:48 GMT
Author: markt
Date: Tue Oct 27 13:28:48 2009
New Revision: 830170

URL: http://svn.apache.org/viewvc?rev=830170&view=rev
Log:
Complete the fix for DBCP-265
I noticed this gap when writing the Javadoc for DelegatingDatabaseMetaData
Test case to follow

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

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingConnection.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingConnection.java?rev=830170&r1=830169&r2=830170&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingConnection.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp/DelegatingConnection.java Tue
Oct 27 13:28:48 2009
@@ -33,6 +33,7 @@
 import java.sql.ClientInfoStatus;
 import java.sql.Clob;
 import java.sql.NClob;
+import java.sql.ResultSet;
 import java.sql.SQLClientInfoException;
 import java.sql.SQLXML;
 import java.sql.Struct;
@@ -419,6 +420,10 @@
                     Object trace = traceIter.next();
                     if (trace instanceof Statement) {
                         ((Statement) trace).close();
+                    } else if (trace instanceof ResultSet) {
+                        // DBCP-265: Need to close the result sets that are
+                        // generated via DatabaseMetaData
+                        ((ResultSet) trace).close();
                     }
                 }
                 clearTrace();



Mime
View raw message