[
https://issues.apache.org/jira/browse/HADOOP-5476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706667#action_12706667
]
Chris Douglas commented on HADOOP-5476:
---------------------------------------
If seek or init throws a RuntimeException, it's wrong. Unfortunately, init
_does_ throw IllegalArgumentException if the codec lookup fails. *sigh*
You're right, try-finally is required. I'd still use IOUtils::cleanup to close
the stream and drop the comments, though.
> calling new SequenceFile.Reader(...) leaves an InputStream open, if the given
> sequence file is broken
> -----------------------------------------------------------------------------------------------------
>
> Key: HADOOP-5476
> URL: https://issues.apache.org/jira/browse/HADOOP-5476
> Project: Hadoop Core
> Issue Type: Bug
> Components: io
> Affects Versions: 0.19.1, 0.20.0
> Reporter: Michael Tamm
> Assignee: Michael Tamm
> Attachments: test_and_fix_for_HADOOP-5476.patch,
> updated_test_and_fix_for_HADOOP-5476.patch
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.