hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andras Bokor (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HADOOP-5943) IOUtils#copyBytes methods should not close streams that are passed in as parameters
Date Fri, 13 Oct 2017 18:46:00 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-5943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16204018#comment-16204018
] 

Andras Bokor edited comment on HADOOP-5943 at 10/13/17 6:45 PM:
----------------------------------------------------------------

Javac warnings are ok.
JUnit failure is unrelated (YARN-7299).


was (Author: boky01):
JUnit failure is unrelated (YARN-7299).

> IOUtils#copyBytes methods should not close streams that are passed in as parameters
> -----------------------------------------------------------------------------------
>
>                 Key: HADOOP-5943
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5943
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: io
>            Reporter: Hairong Kuang
>            Assignee: Andras Bokor
>         Attachments: HADOOP-5943.01.patch, HADOOP-5943.02.patch, HADOOP-5943.03.patch
>
>
> The following methods in IOUtils close the streams that are passed in as parameters.
Calling these methods can easily trigger findbug OBL: Method may fail to clean up stream or
resource (OBL_UNSATISFIED_OBLIGATION). A good practice should be to close a stream in the
same method where the stream is opened. 
> public static void copyBytes(InputStream in, OutputStream out, int buffSize, boolean
close) 
> public static void copyBytes(InputStream in, OutputStream out, Configuration conf, boolean
close)
> These methods should be deprecated.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message