You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2023/01/09 10:19:47 UTC

[GitHub] [calcite-avatica] zabetak commented on a diff in pull request #204: [CALCITE-5120] Throw SQLException from UnregisteredDriver#connect if url is null

zabetak commented on code in PR #204:
URL: https://github.com/apache/calcite-avatica/pull/204#discussion_r1064475716


##########
core/src/main/java/org/apache/calcite/avatica/UnregisteredDriver.java:
##########
@@ -127,6 +127,9 @@ private static RuntimeException handle(String msg, Throwable e) {
   }
 
   public Connection connect(String url, Properties info) throws SQLException {
+    if (url == null) {
+      throw new SQLException("url can not be null!");
+    }

Review Comment:
   I think the check should be moved to `acceptsURL` method since the latter should also throw when URL is null according to the javadoc.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org