change
This commit is contained in:
parent
a5f02a8954
commit
ff1ab88cf3
|
@ -246,17 +246,17 @@ public abstract class AbstractStatement implements Statement {
|
|||
return this.closeOnCompletion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T unwrap(Class<T> iface) throws SQLException {
|
||||
try {
|
||||
return iface.cast(this);
|
||||
} catch (ClassCastException cce) {
|
||||
throw new SQLException("Unable to unwrap to " + iface.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWrapperFor(Class<?> iface) throws SQLException {
|
||||
return iface.isInstance(this);
|
||||
}
|
||||
// @Override
|
||||
// public <T> T unwrap(Class<T> iface) throws SQLException {
|
||||
// try {
|
||||
// return iface.cast(this);
|
||||
// } catch (ClassCastException cce) {
|
||||
// throw new SQLException("Unable to unwrap to " + iface.toString());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isWrapperFor(Class<?> iface) throws SQLException {
|
||||
// return iface.isInstance(this);
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -8,9 +8,6 @@ import org.junit.Test;
|
|||
import java.sql.*;
|
||||
import java.util.Properties;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class StatementTest {
|
||||
static Connection connection = null;
|
||||
static Statement statement = null;
|
||||
|
@ -60,10 +57,10 @@ public class StatementTest {
|
|||
statement.executeUpdate("insert into " + dbName + "." + tName + " values (" + ts + ", 1)");
|
||||
statement.executeQuery("select * from " + dbName + "." + tName);
|
||||
ResultSet resultSet = statement.getResultSet();
|
||||
assertTrue(null != resultSet);
|
||||
Assert.assertNotNull(resultSet);
|
||||
|
||||
boolean isClosed = statement.isClosed();
|
||||
assertEquals(false, isClosed);
|
||||
Assert.assertEquals(false, isClosed);
|
||||
}
|
||||
|
||||
@Test(expected = SQLException.class)
|
||||
|
|
Loading…
Reference in New Issue