mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
修正未关闭statement先关闭connection时的bug
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@432 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -17,7 +17,6 @@ package com.alibaba.druid.pool;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
@@ -113,7 +112,9 @@ public final class ConnectionHolder {
|
||||
connectionEventListeners.clear();
|
||||
statementEventListeners.clear();
|
||||
|
||||
for (Statement stmt : statementTrace) {
|
||||
|
||||
for (Object item : statementTrace.toArray()) {
|
||||
PoolableStatement stmt = (PoolableStatement) item;
|
||||
try {
|
||||
if (!stmt.isClosed()) {
|
||||
stmt.close();
|
||||
|
||||
Reference in New Issue
Block a user