提交 3f73a7a6 authored 作者: Noel Grandin's avatar Noel Grandin

fix some TestCrashAPI issues

上级 2962ea18
......@@ -3094,10 +3094,14 @@ public class JdbcDatabaseMetaData extends TraceObject implements
@Override
@SuppressWarnings("unchecked")
public <T> T unwrap(Class<T> iface) throws SQLException {
if (isWrapperFor(iface)) {
return (T) this;
try {
if (isWrapperFor(iface)) {
return (T) this;
}
throw DbException.getInvalidValueException("iface", iface);
} catch (Exception e) {
throw logAndConvert(e);
}
throw DbException.getInvalidValueException("iface", iface);
}
/**
......
......@@ -227,10 +227,14 @@ public class JdbcParameterMetaData extends TraceObject implements
@Override
@SuppressWarnings("unchecked")
public <T> T unwrap(Class<T> iface) throws SQLException {
if (isWrapperFor(iface)) {
return (T) this;
try {
if (isWrapperFor(iface)) {
return (T) this;
}
throw DbException.getInvalidValueException("iface", iface);
} catch (Exception e) {
throw logAndConvert(e);
}
throw DbException.getInvalidValueException("iface", iface);
}
/**
......
......@@ -3683,10 +3683,14 @@ public class JdbcResultSet extends TraceObject implements ResultSet, JdbcResultS
@Override
@SuppressWarnings("unchecked")
public <T> T unwrap(Class<T> iface) throws SQLException {
if (isWrapperFor(iface)) {
return (T) this;
try {
if (isWrapperFor(iface)) {
return (T) this;
}
throw DbException.getInvalidValueException("iface", iface);
} catch (Exception e) {
throw logAndConvert(e);
}
throw DbException.getInvalidValueException("iface", iface);
}
/**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论