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