[ 
https://issues.apache.org/jira/browse/MAPREDUCE-2631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sunil G updated MAPREDUCE-2631:
-------------------------------
    Attachment: MAPREDUCE-2631.0006.patch

As per the offline discussion with [[email protected]], *file* or 
*out* need not have to be set null. So we can avoid {{isClosed}}. We will get 
an IOException since the streams are already closed. I think in such cases, 
caller can get exception rather than suppressing the same.

> Potential resource leaks in BinaryProtocol$TeeOutputStream.java
> ---------------------------------------------------------------
>
>                 Key: MAPREDUCE-2631
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2631
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.23.0
>            Reporter: Ravi Teja Ch N V
>            Assignee: Sunil G
>         Attachments: 0001-MAPREDUCE-2631.patch, 0002-MAPREDUCE-2631.patch, 
> 0003-MAPREDUCE-2631.patch, 0004-MAPREDUCE-2631.patch, 
> MAPREDUCE-2631.0005.patch, MAPREDUCE-2631.0006.patch, 
> MAPREDUCE-2631.02.patch, MAPREDUCE-2631.1.patch, MAPREDUCE-2631.2.patch, 
> MAPREDUCE-2631.3.patch, MAPREDUCE-2631.patch
>
>
> {code:title=BinaryProtocol$TeeOutputStream.java|borderStyle=solid}
> public void close() throws IOException {
>       flush();
>       file.close();
>       out.close();
>     }
> {code} 
> In the above code, if the file.close() throws any exception out will not be 
> closed.
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to