[
https://issues.apache.org/jira/browse/CALCITE-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14228228#comment-14228228
]
Vladimir Sitnikov commented on CALCITE-352:
-------------------------------------------
{quote}Attaching patch that checks {quote}
1) Pull requests for https://github.com/apache/incubator-calcite would be
easier to review (github allows conversations on the line-by-line basis) and
merge (commit author is added automatically). Nevertheless, patch files are
welcome as well.
2) In such trivial cases it makes sense to have just a single patch, not two
distinct changes.
{quote}I'm not sure how to test this, though{quote}
3) Historically, jdbc-related tests are located in
{{org.apache.calcite.test.JdbcTest}}. Personally, I think this class should be
refactored to smaller units, however it is another issue.
Can you please add a test method that runs sql, closes the resultset and tries
to invoke resultset.next?
The expected behaviour would be to catch {{SQLException}} with the appropriate
code.
> Calling next() on closed AvaticaResultSet gives NPE
> ---------------------------------------------------
>
> Key: CALCITE-352
> URL: https://issues.apache.org/jira/browse/CALCITE-352
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Julian Hyde
> Labels: newbie
> Attachments: CALCITE-352-1.patch
>
>
> If you call close() on an AvaticaResultSet then call next(), it gives a
> NullPointerException (due to the cursor field being null). It should give a
> SQLException (per the Javadoc of the ResultSet.next method).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)