hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swarnim Kulkarni (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10517) InputStream is not closed in two methods of JarFinder
Date Mon, 05 May 2014 14:48:16 GMT

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

Swarnim Kulkarni commented on HADOOP-10517:

I might be mistaken but isn't the closeEntry closes just the current entry but still leaves
the stream open. I would have thought that we would still need to call the close() on the
outputstream to release all the resources that it is holding on to.

> 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
>            Assignee: Ted Yu
>            Priority: Minor
>         Attachments: HADOOP-10517.1.patch.txt, hadoop-10517-v1.txt, hadoop-10517-v2.txt
> JarFinder#jarDir() and JarFinder#zipDir() have such code:
> {code}
>                  InputStream is = new FileInputStream(f);
>                  copyToZipStream(is, anEntry, zos);
> {code}
> The InputStream is closed in copyToZipStream() but should be enclosed in finally block.

This message was sent by Atlassian JIRA

View raw message