hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10517) InputStream is not closed in two methods of JarFinder
Date Sat, 03 May 2014 03:01:39 GMT

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

Ted Yu commented on HADOOP-10517:
---------------------------------

copyToZipStream() already closes InputStream parameter.
Closing InputStream outside copyToZipStream() is not necessary.

> InputStream is not closed in two methods of JarFinder
> -----------------------------------------------------
>
>                 Key: HADOOP-10517
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10517
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>         Attachments: HADOOP-10517.1.patch.txt, hadoop-10517-v1.txt
>
>
> JarFinder#jarDir() and JarFinder#zipDir() have such code:
> {code}
>                  InputStream is = new FileInputStream(f);
>                  copyToZipStream(is, anEntry, zos);
> {code}
> The InputStream is not closed after copy operation.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message