This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git


The following commit(s) were added to refs/heads/master by this push:
     new c11ddde  [DBCP-567] Use abort rather than close to destroy abandoned 
connections #68.
c11ddde is described below

commit c11ddde8f032e660377d12bf7597c20136a0ff92
Author: Gary Gregory <[email protected]>
AuthorDate: Mon Dec 28 12:22:43 2020 -0500

    [DBCP-567] Use abort rather than close to destroy abandoned connections
    #68.
    
    Simpler type cast.
---
 src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java 
b/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
index 8fd75b3..3458c93 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
@@ -78,7 +78,7 @@ public class PoolingDataSource<C extends Connection> 
implements DataSource, Auto
     public void close() throws RuntimeException, SQLException {
         try {
             if (pool instanceof GenericObjectPool) {
-                ((PoolableConnectionFactory) ((GenericObjectPool<?>) 
pool).getFactory()).close();
+                ((AutoCloseable) ((GenericObjectPool<?>) 
pool).getFactory()).close();
             }
             pool.close();
         } catch (final RuntimeException rte) {

Reply via email to