You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Stanislav Lukyanov (Jira)" <ji...@apache.org> on 2021/10/06 10:23:00 UTC
[jira] [Commented] (IGNITE-15688) IgniteClient.close shouldn't
throw Exception
[ https://issues.apache.org/jira/browse/IGNITE-15688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17424909#comment-17424909 ]
Stanislav Lukyanov commented on IGNITE-15688:
---------------------------------------------
[~isapego] could you please review?
> IgniteClient.close shouldn't throw Exception
> --------------------------------------------
>
> Key: IGNITE-15688
> URL: https://issues.apache.org/jira/browse/IGNITE-15688
> Project: Ignite
> Issue Type: Bug
> Components: thin client
> Reporter: Stanislav Lukyanov
> Assignee: Stanislav Lukyanov
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> IgniteClient interface currently doesn't override close() from AutoClosable. Because of that, it inherits `close() throws Exception` forcing all users to catch Exception when using IgniteClient.
>
> In fact, this shouldn't be required. `TcpIgniteClient implements IgniteClient` currently throws Exception but it doesn't need to - its code doesn't throw any checked exceptions.
>
> Proposal:
> # Add `@Overrides public void close()` with no `throws` to IgniteClient.
> # Remove `throws Exception` from `TcpIgniteClient::close`
> Note: this change is fully backwards-compatible. It is legal to narrow the scope of `throws` in a new version of a method.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)