You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Gregory Hart (Jira)" <ji...@apache.org> on 2022/04/27 17:41:00 UTC
[jira] [Created] (CALCITE-5120) Throw SQLException from UnregisteredDriver#connect if url is null
Gregory Hart created CALCITE-5120:
-------------------------------------
Summary: Throw SQLException from UnregisteredDriver#connect if url is null
Key: CALCITE-5120
URL: https://issues.apache.org/jira/browse/CALCITE-5120
Project: Calcite
Issue Type: Bug
Components: avatica
Affects Versions: avatica-1.20.0
Reporter: Gregory Hart
The documentation for java.sql.Driver#connect states that a SQLException should be thrown "if a database access error occurs or the url is null." However, UnregisteredDriver throws a NullPointerException instead.
*Steps to reproduce:*
new org.apache.calcite.avatica.remote.Driver().connect(null, new Properties());
*Expected result:*
A SQLException is thrown
*Actual result:*
A NullPointerException is thrown
{noformat}
java.lang.NullPointerException
at org.apache.calcite.avatica.UnregisteredDriver.acceptsURL(UnregisteredDriver.java:144)
at org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:130){noformat}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)