[
https://issues.apache.org/jira/browse/CALCITE-5120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stamatis Zampetakis updated CALCITE-5120:
-----------------------------------------
Summary: UnregisteredDriver#connect should throw SQLException, not
NullPointerException, if url is null (was: Throw SQLException from
UnregisteredDriver#connect if url is null)
> UnregisteredDriver#connect should throw SQLException, not
> NullPointerException, 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
> Assignee: Zou
> Priority: Minor
> Labels: pull-request-available
> Fix For: avatica-1.23.0
>
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> 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.10#820010)