You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2016/04/03 17:28:25 UTC

[jira] [Created] (HADOOP-12995) ByteRangeInputStream.readFully leaks stream handles on failure

Steve Loughran created HADOOP-12995:
---------------------------------------

             Summary: ByteRangeInputStream.readFully leaks stream handles on failure
                 Key: HADOOP-12995
                 URL: https://issues.apache.org/jira/browse/HADOOP-12995
             Project: Hadoop Common
          Issue Type: Sub-task
          Components: fs
    Affects Versions: 2.8.0
            Reporter: Steve Loughran
            Assignee: Steve Loughran


in {{ByteRangeInputStream.readFully}}, if the requested amount of data is out of range, the EOFException is thrown —without closing the input stream.

Fix: move test into the try/finally clause

using java 7 try-with-resources would be cleaner, but make it harder to switch to aborting TCP channels if that was felt to be needed here



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)