calcite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject calcite git commit: [CALCITE-1699] Statement may be null
Date Sun, 19 Mar 2017 18:45:51 GMT
Repository: calcite
Updated Branches:
  refs/heads/master 0e11746ac -> 554d963ec


[CALCITE-1699] Statement may be null

Per Javadoc, when the ResultSet that created a Statement
was created from a DatabaseMetaData call, the Statement
may be null.

Closes apache/calcite#403


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

Branch: refs/heads/master
Commit: 554d963ece3bbcd7a36fc1b9922c8a5c6e1444c1
Parents: 0e11746
Author: Josh Elser <elserj@apache.org>
Authored: Wed Mar 15 01:15:52 2017 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Sun Mar 19 14:43:11 2017 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/calcite/avatica/jdbc/StatementInfo.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/554d963e/avatica/server/src/main/java/org/apache/calcite/avatica/jdbc/StatementInfo.java
----------------------------------------------------------------------
diff --git a/avatica/server/src/main/java/org/apache/calcite/avatica/jdbc/StatementInfo.java
b/avatica/server/src/main/java/org/apache/calcite/avatica/jdbc/StatementInfo.java
index ff27d05..c4f8e21 100644
--- a/avatica/server/src/main/java/org/apache/calcite/avatica/jdbc/StatementInfo.java
+++ b/avatica/server/src/main/java/org/apache/calcite/avatica/jdbc/StatementInfo.java
@@ -20,7 +20,6 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.SQLFeatureNotSupportedException;
 import java.sql.Statement;
-import java.util.Objects;
 
 /**
  * All we know about a statement. Encapsulates a {@link ResultSet}.
@@ -37,7 +36,8 @@ public class StatementInfo {
   private boolean resultsInitialized = false;
 
   public StatementInfo(Statement statement) {
-    this.statement = Objects.requireNonNull(statement);
+    // May be null when coming from a DatabaseMetaData call
+    this.statement = statement;
   }
 
   // Visible for testing


Mime
View raw message