hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hairong Kuang (JIRA)" <j...@apache.org>
Subject [jira] Created: (HADOOP-5943) OUtils#copyBytes methods should not close streams that are passed in as parameters
Date Fri, 29 May 2009 21:54:45 GMT
OUtils#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 Core
          Issue Type: Bug
          Components: io
            Reporter: Hairong Kuang
             Fix For: 0.21.0


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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message