HADOOP-11500. InputStream is left unclosed in ApplicationClassLoader. Contributed by Ted Yu.
This commit is contained in:
parent
786dbdfad8
commit
825923f7b9
|
@ -744,6 +744,9 @@ Release 2.7.0 - UNRELEASED
|
||||||
HADOOP-11209. Configuration#updatingResource/finalParameters are not
|
HADOOP-11209. Configuration#updatingResource/finalParameters are not
|
||||||
thread-safe. (Varun Saxena via ozawa)
|
thread-safe. (Varun Saxena via ozawa)
|
||||||
|
|
||||||
|
HADOOP-11500. InputStream is left unclosed in ApplicationClassLoader.
|
||||||
|
(Ted Yu via ozawa)
|
||||||
|
|
||||||
Release 2.6.0 - 2014-11-18
|
Release 2.6.0 - 2014-11-18
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -67,10 +67,8 @@ public class ApplicationClassLoader extends URLClassLoader {
|
||||||
};
|
};
|
||||||
|
|
||||||
static {
|
static {
|
||||||
InputStream is = null;
|
try (InputStream is = ApplicationClassLoader.class.getClassLoader()
|
||||||
try {
|
.getResourceAsStream(PROPERTIES_FILE);) {
|
||||||
is = ApplicationClassLoader.class.getClassLoader().
|
|
||||||
getResourceAsStream(PROPERTIES_FILE);
|
|
||||||
if (is == null) {
|
if (is == null) {
|
||||||
throw new ExceptionInInitializerError("properties file " +
|
throw new ExceptionInInitializerError("properties file " +
|
||||||
PROPERTIES_FILE + " is not found");
|
PROPERTIES_FILE + " is not found");
|
||||||
|
|
Loading…
Reference in New Issue