[
https://issues.apache.org/jira/browse/CALCITE-5120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17678461#comment-17678461
]
Zou edited comment on CALCITE-5120 at 1/19/23 6:13 AM:
-------------------------------------------------------
[~julianhyde] 'Dan Zou' is ok
was (Author: frankzou):
[~julianhyde] Yes, of course
> 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)