HDFS-5352. Server#initLog() doesn't close InputStream in httpfs. Contributed by Ted Yu.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1532158 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jing Zhao 2013-10-15 01:17:21 +00:00
parent 86b5f80e8c
commit 258c181ade
2 changed files with 8 additions and 1 deletions

View File

@ -418,7 +418,11 @@ public class Server {
Properties props = new Properties();
try {
InputStream is = getResource(DEFAULT_LOG4J_PROPERTIES);
props.load(is);
try {
props.load(is);
} finally {
is.close();
}
} catch (IOException ex) {
throw new ServerException(ServerException.ERROR.S03, DEFAULT_LOG4J_PROPERTIES, ex.getMessage(), ex);
}

View File

@ -340,6 +340,9 @@ Release 2.3.0 - UNRELEASED
HDFS-5266. ElasticByteBufferPool#Key does not implement equals. (cnauroth)
HDFS-5352. Server#initLog() doesn't close InputStream in httpfs. (Ted Yu via
jing9)
Release 2.2.1 - UNRELEASED
INCOMPATIBLE CHANGES