6881317: regression: NPE in CloseableURLClassLoader
Reviewed-by: darcy
This commit is contained in:
parent
528f733b28
commit
e851626bac
@ -69,8 +69,10 @@ class CloseableURLClassLoader
|
|||||||
if (l.getClass().getName().equals("sun.misc.URLClassPath$JarLoader")) {
|
if (l.getClass().getName().equals("sun.misc.URLClassPath$JarLoader")) {
|
||||||
Field jarField = l.getClass().getDeclaredField("jar");
|
Field jarField = l.getClass().getDeclaredField("jar");
|
||||||
JarFile jar = (JarFile) getField(l, jarField);
|
JarFile jar = (JarFile) getField(l, jarField);
|
||||||
//System.err.println("CloseableURLClassLoader: closing " + jar);
|
if (jar != null) {
|
||||||
jar.close();
|
//System.err.println("CloseableURLClassLoader: closing " + jar);
|
||||||
|
jar.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
Loading…
Reference in New Issue
Block a user