[ https://issues.apache.org/jira/browse/CALCITE-5120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stamatis Zampetakis resolved CALCITE-5120. ------------------------------------------ Resolution: Fixed Fixed in https://github.com/apache/calcite-avatica/commit/ac47eb619575b13a92b16574d2f4e6af51139e05. Thanks for the PR [~FrankZou]! > 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)