HADOOP-10223. MiniKdc#main() should close the FileReader it creates. (Ted Yu via tucu)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1557627 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aa0c489a28
commit
bc2a443418
@ -511,6 +511,9 @@ Release 2.4.0 - UNRELEASED
|
|||||||
HADOOP-10214. Fix multithreaded correctness warnings in ActiveStandbyElector
|
HADOOP-10214. Fix multithreaded correctness warnings in ActiveStandbyElector
|
||||||
(Liang Xie via kasha)
|
(Liang Xie via kasha)
|
||||||
|
|
||||||
|
HADOOP-10223. MiniKdc#main() should close the FileReader it creates.
|
||||||
|
(Ted Yu via tucu)
|
||||||
|
|
||||||
Release 2.3.0 - UNRELEASED
|
Release 2.3.0 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -125,7 +125,15 @@ public static void main(String[] args) throws Exception {
|
|||||||
+ file.getAbsolutePath());
|
+ file.getAbsolutePath());
|
||||||
}
|
}
|
||||||
Properties userConf = new Properties();
|
Properties userConf = new Properties();
|
||||||
userConf.load(new FileReader(file));
|
FileReader r = null;
|
||||||
|
try {
|
||||||
|
r = new FileReader(file);
|
||||||
|
userConf.load(r);
|
||||||
|
} finally {
|
||||||
|
if (r != null) {
|
||||||
|
r.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
for (Map.Entry entry : userConf.entrySet()) {
|
for (Map.Entry entry : userConf.entrySet()) {
|
||||||
conf.put(entry.getKey(), entry.getValue());
|
conf.put(entry.getKey(), entry.getValue());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user