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
|
||||
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
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -67,10 +67,8 @@ public class ApplicationClassLoader extends URLClassLoader {
|
|||
};
|
||||
|
||||
static {
|
||||
InputStream is = null;
|
||||
try {
|
||||
is = ApplicationClassLoader.class.getClassLoader().
|
||||
getResourceAsStream(PROPERTIES_FILE);
|
||||
try (InputStream is = ApplicationClassLoader.class.getClassLoader()
|
||||
.getResourceAsStream(PROPERTIES_FILE);) {
|
||||
if (is == null) {
|
||||
throw new ExceptionInInitializerError("properties file " +
|
||||
PROPERTIES_FILE + " is not found");
|
||||
|
|
Loading…
Reference in New Issue