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

Nick Dimiduk commented on HBASE-11012:
--------------------------------------

copyToZipStream(InputStream, ZipEntry, ZipOutputStream) closes the InputStream 
for the caller. This patch should result in a double-close. Better to put the 
try/finally in copyToZipStream or return responsibility to the caller. Ugly as 
it is, the current implementation is probably not broken.

> InputStream is not closed in two methods of JarFinder
> -----------------------------------------------------
>
>                 Key: HBASE-11012
>                 URL: https://issues.apache.org/jira/browse/HBASE-11012
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>            Priority: Trivial
>         Attachments: 11012-v1.txt
>
>
> JarFinder#jarDir() and JarFinder#zipDir() have such code:
> {code}
> 99                 InputStream is = new FileInputStream(f);
> 100                 copyToZipStream(is, anEntry, zos);
> {code}
> The InputStream is not closed after copy operation.



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

Reply via email to