From dda79b37d1d32657df59f5cccb5b8c05e2234054 Mon Sep 17 00:00:00 2001 From: zyyang Date: Wed, 30 Dec 2020 13:16:23 +0800 Subject: [PATCH] change --- .../main/java/com/taosdata/jdbc/rs/RestfulConnection.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulConnection.java b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulConnection.java index 00055731e3..8bd974e3c2 100644 --- a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulConnection.java +++ b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulConnection.java @@ -115,6 +115,9 @@ public class RestfulConnection implements Connection { @Override public DatabaseMetaData getMetaData() throws SQLException { + if (isClosed()) + throw new SQLException(CONNECTION_IS_CLOSED); + return this.metadata; } @@ -122,8 +125,7 @@ public class RestfulConnection implements Connection { public void setReadOnly(boolean readOnly) throws SQLException { if (isClosed()) throw new SQLException(CONNECTION_IS_CLOSED); - if (!readOnly) - throw new SQLFeatureNotSupportedException(TSDBConstants.UNSUPPORT_METHOD_EXCEPTIONZ_MSG); + // nothing to do } @Override -- GitLab