crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Wills (JIRA)" <>
Subject [jira] [Commented] (CRUNCH-356) Use IOUtils.closeQuietly instead of Closeables.closeQuietly
Date Wed, 26 Feb 2014 08:19:20 GMT


Josh Wills commented on CRUNCH-356:

Read over the Guava commentary, which was interesting. I think that we're actually using closeQuietly
as intended in the AutoClosingIterator case, since a) we're in a read context and b) it's
one of those rare times where there isn't a nearby read() where we're handling an IOException
anyway. The closeQuietly call in the Scrunch interpreter seems like a more legit problem for
ignoring the IOException.

In any case, no opposition to someone posting a patch that eliminates both of these uses in
favor of explicit IOException handling.

> Use IOUtils.closeQuietly instead of Closeables.closeQuietly
> -----------------------------------------------------------
>                 Key: CRUNCH-356
>                 URL:
>             Project: Crunch
>          Issue Type: Improvement
>          Components: Core
>            Reporter: John Leacox
>            Assignee: Josh Wills
>            Priority: Minor
>             Fix For: 0.10.0, 0.8.3
>         Attachments: patch.diff
> Closeables.closeQuietly was deprecated in Guava 13 and removed in Guava 16. If a consumer
of crunch-core is using Guava 16+ a NoSuchMethodError could occur where Closeables.closeQuietly
is being used.
> The other crunch components are already using IOUtils.closeQuietly, so crunch-core could
pull in common-io and use IOUtils.closeQuietly.

This message was sent by Atlassian JIRA

View raw message