improve LogFilter

This commit is contained in:
wenshao
2012-12-25 01:02:28 +08:00
parent 0ffda4f76f
commit 34dc7b577d
6 changed files with 208 additions and 16 deletions
@@ -137,6 +137,10 @@ public class DruidPooledConnection extends PoolableWrapper implements javax.sql.
public void closePoolableStatement(DruidPooledPreparedStatement stmt) throws SQLException {
PreparedStatement rawStatement = stmt.getRawPreparedStatement();
if (holder == null) {
return;
}
if (holder.isPoolPreparedStatements()) {
try {
rawStatement.clearParameters();
@@ -145,10 +149,6 @@ public class DruidPooledConnection extends PoolableWrapper implements javax.sql.
}
}
if (holder == null) {
return;
}
stmt.getPreparedStatementHolder().decrementInUseCount();
if (holder.isPoolPreparedStatements()) {
holder.getStatementPool().put(stmt.getPreparedStatementHolder());