You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2017/08/31 15:14:38 UTC

[5/7] ignite git commit: IGNITE-5425 JDBC thin driver: don't throw unsupported exception on ClientInfo methods. This closes #2184. This closes #2525.

IGNITE-5425 JDBC thin driver: don't throw unsupported exception on ClientInfo methods. This closes #2184. This closes #2525.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fd9ab957
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fd9ab957
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fd9ab957

Branch: refs/heads/ignite-5896
Commit: fd9ab957911ee218544ded288dd42d77abdbb5ef
Parents: 8629b50
Author: tledkov-gridgain <tl...@gridgain.com>
Authored: Thu Aug 31 17:03:44 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Thu Aug 31 17:03:44 2017 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/jdbc/thin/JdbcThinConnection.java   | 6 ++++--
 .../ignite/internal/jdbc/thin/JdbcThinDatabaseMetadata.java    | 1 -
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fd9ab957/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
index 370cfa4..ff76011 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
@@ -473,12 +473,14 @@ public class JdbcThinConnection implements Connection {
 
     /** {@inheritDoc} */
     @Override public void setClientInfo(String name, String val) throws SQLClientInfoException {
-        throw new UnsupportedOperationException("Client info is not supported.");
+        if (closed)
+            throw new SQLClientInfoException("Connection is closed.", null);
     }
 
     /** {@inheritDoc} */
     @Override public void setClientInfo(Properties props) throws SQLClientInfoException {
-        throw new UnsupportedOperationException("Client info is not supported.");
+        if (closed)
+            throw new SQLClientInfoException("Connection is closed.", null);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/fd9ab957/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinDatabaseMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinDatabaseMetadata.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinDatabaseMetadata.java
index 583bcec..32e1858 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinDatabaseMetadata.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinDatabaseMetadata.java
@@ -1490,7 +1490,6 @@ public class JdbcThinDatabaseMetadata implements DatabaseMetaData {
 
     /** {@inheritDoc} */
     @Override public ResultSet getClientInfoProperties() throws SQLException {
-        // TODO: IGNITE-5425.
         return new JdbcThinResultSet(Collections.<List<Object>>emptyList(), Arrays.asList(
             new JdbcColumnMeta(null, null, "NAME", String.class),
             new JdbcColumnMeta(null, null, "MAX_LEN", Integer.class),