[jira] [Updated] (HADOOP-10517) InputStream is not closed in two methods of JarFinder
[ https://issues.apache.org/jira/browse/HADOOP-10517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Nauroth updated HADOOP-10517: --- Component/s: util test Target Version/s: 3.0.0, 2.5.0 Affects Version/s: 3.0.0 2.4.0 Hadoop Flags: Reviewed +1 for hadoop-10517-v1.txt. I'll commit this. > 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 > Components: test, util >Affects Versions: 3.0.0, 2.4.0 >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 (v6.2#6252)
[jira] [Updated] (HADOOP-10517) InputStream is not closed in two methods of JarFinder
[ https://issues.apache.org/jira/browse/HADOOP-10517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Nauroth updated HADOOP-10517: --- Resolution: Fixed Fix Version/s: 2.5.0 3.0.0 Status: Resolved (was: Patch Available) I committed this to trunk and branch-2. Ted, thank you for the patch. > 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 > Components: test, util >Affects Versions: 3.0.0, 2.4.0 >Reporter: Ted Yu >Assignee: Ted Yu >Priority: Minor > Fix For: 3.0.0, 2.5.0 > > 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 (v6.2#6252)
[jira] [Updated] (HADOOP-10517) InputStream is not closed in two methods of JarFinder
[ https://issues.apache.org/jira/browse/HADOOP-10517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HADOOP-10517: Attachment: hadoop-10517-v2.txt Patch v2 addresses Swarnim's comment. > 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, > 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 (v6.2#6252)
[jira] [Updated] (HADOOP-10517) InputStream is not closed in two methods of JarFinder
[ https://issues.apache.org/jira/browse/HADOOP-10517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HADOOP-10517: Description: 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. was: 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. > 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 closed in copyToZipStream() but should be enclosed in > finally block. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (HADOOP-10517) InputStream is not closed in two methods of JarFinder
[ https://issues.apache.org/jira/browse/HADOOP-10517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HADOOP-10517: Attachment: hadoop-10517-v1.txt How about this patch ? > 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)
[jira] [Updated] (HADOOP-10517) InputStream is not closed in two methods of JarFinder
[ https://issues.apache.org/jira/browse/HADOOP-10517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Swarnim Kulkarni updated HADOOP-10517: -- Attachment: HADOOP-10517.1.patch.txt Patch attached. > 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 > > > 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)
[jira] [Updated] (HADOOP-10517) InputStream is not closed in two methods of JarFinder
[ https://issues.apache.org/jira/browse/HADOOP-10517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Swarnim Kulkarni updated HADOOP-10517: -- Status: Patch Available (was: Open) > 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 > > > 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)