hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-10368) InputStream is not closed in VersionInfo ctor
Date Wed, 26 Feb 2014 19:41:20 GMT

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

Tsz Wo (Nicholas), SZE updated HADOOP-10368:
--------------------------------------------

     Component/s: util
    Hadoop Flags: Reviewed

+1 patch looks good.

> InputStream is not closed in VersionInfo ctor
> ---------------------------------------------
>
>                 Key: HADOOP-10368
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10368
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>            Reporter: Ted Yu
>            Assignee: Tsuyoshi OZAWA
>            Priority: Minor
>         Attachments: HADOOP-10368.1.patch, HADOOP-10368.2.patch
>
>
> {code}
>       InputStream is = Thread.currentThread().getContextClassLoader()
>         .getResourceAsStream(versionInfoFile);
>       if (is == null) {
>         throw new IOException("Resource not found");
>       }
>       info.load(is);
> {code}
> is should be closed at the end of the method.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message