From ff1ab88cf3216cb1a656fee5f073628b317da28d Mon Sep 17 00:00:00 2001 From: zyyang Date: Wed, 3 Feb 2021 19:34:55 +0800 Subject: [PATCH] change --- .../com/taosdata/jdbc/AbstractStatement.java | 26 +++++++++---------- .../java/com/taosdata/jdbc/StatementTest.java | 7 ++--- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/AbstractStatement.java b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/AbstractStatement.java index 4aa1ff8690..acbfc66c94 100644 --- a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/AbstractStatement.java +++ b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/AbstractStatement.java @@ -246,17 +246,17 @@ public abstract class AbstractStatement implements Statement { return this.closeOnCompletion; } - @Override - public T unwrap(Class 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 unwrap(Class 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); +// } } diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/StatementTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/StatementTest.java index b09482fb03..e9031e9fde 100644 --- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/StatementTest.java +++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/StatementTest.java @@ -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) -- GitLab