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