[
https://issues.apache.org/jira/browse/CALCITE-2219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16404295#comment-16404295
]
ASF GitHub Bot commented on CALCITE-2219:
-----------------------------------------
Github user risdenk commented on a diff in the pull request:
https://github.com/apache/calcite-avatica/pull/33#discussion_r175317817
--- Diff:
core/src/main/java/org/apache/calcite/avatica/AvaticaConnection.java ---
@@ -392,14 +420,17 @@ public void setClientInfo(Properties properties)
}
public String getClientInfo(String name) throws SQLException {
- throw HELPER.unsupported();
+ checkOpen();
+ return null;
--- End diff --
This could be `return this.getClientInfo().getProperty(name)` now that
`getClientInfo()` returns a `Properties` object. This would remove the need for
the added `checkOpen()` and explicit `return null`.
> Avatica Connection/Statement/ResultSet don't throw if resource is closed
> ------------------------------------------------------------------------
>
> Key: CALCITE-2219
> URL: https://issues.apache.org/jira/browse/CALCITE-2219
> Project: Calcite
> Issue Type: Bug
> Components: avatica
> Reporter: Laurent Goujon
> Assignee: Laurent Goujon
> Priority: Major
>
> According to JDBC spec/Javadoc, almost all methods of
> {{Connection}}/{{Statement}}/{{PreparedStatement}}/{{ResultSet}} should throw
> an exception if resource is closed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)