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
@@ -33,8 +33,6 @@ import java.sql.SQLXML;
import java.sql.Statement;
import java.util.Calendar;
import com.alibaba.druid.proxy.jdbc.ResultSetProxy;
/**
* @author wenshao<szujobs@hotmail.com>
*/
@@ -1772,17 +1770,4 @@ public final class DruidPooledResultSet extends PoolableWrapper implements Resul
public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@SuppressWarnings("unchecked")
public <T> T unwrap(Class<T> iface) throws SQLException {
if (iface == ResultSet.class) {
if (rs instanceof ResultSetProxy) {
return rs.unwrap(iface);
}
return (T) rs;
}
return super.unwrap(iface);
}
}