You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2021/07/06 13:50:00 UTC
[jira] [Commented] (IO-742) IOUtils.close(Closeable,
IOConsumer) should not throw IOException
[ https://issues.apache.org/jira/browse/IO-742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17375731#comment-17375731 ]
Gary D. Gregory commented on IO-742:
------------------------------------
Not quite: the consumer is an IOConsumer, not a Consumer. If what you want is a Consumer version of the API, then please feel free to provide a PR.
> IOUtils.close(Closeable, IOConsumer<IOException>) should not throw IOException
> ------------------------------------------------------------------------------
>
> Key: IO-742
> URL: https://issues.apache.org/jira/browse/IO-742
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 2.10.0
> Reporter: Matthias Welz
> Priority: Major
>
> The method
> {code:java}
> public static void close(Closeable closeable, IOConsumer<IOException> consumer){code}
> should not include a _throws IOException_ clause as the IOException will be handled by consumer (which is the point of the method).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)