improve java.sql.Wrapper support

This commit is contained in:
wenshao
2012-12-19 14:58:23 +08:00
parent ce9c120dbe
commit 2a028bdc05
28 changed files with 1203 additions and 125 deletions
@@ -24,7 +24,6 @@ import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import com.alibaba.druid.proxy.jdbc.StatementProxy;
import com.alibaba.druid.support.logging.Log;
import com.alibaba.druid.support.logging.LogFactory;
@@ -628,16 +627,4 @@ public class DruidPooledStatement extends PoolableWrapper implements Statement {
public boolean isCloseOnCompletion() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@SuppressWarnings("unchecked")
public <T> T unwrap(Class<T> iface) throws SQLException {
if (iface == Statement.class) {
if (stmt instanceof StatementProxy) {
return stmt.unwrap(iface);
}
return (T) stmt;
}
return super.unwrap(iface);
}
}