6881317: regression: NPE in CloseableURLClassLoader

Reviewed-by: darcy
This commit is contained in:
Jonathan Gibbons 2009-09-14 17:13:00 -07:00
parent 528f733b28
commit e851626bac

View File

@ -69,8 +69,10 @@ class CloseableURLClassLoader
if (l.getClass().getName().equals("sun.misc.URLClassPath$JarLoader")) {
Field jarField = l.getClass().getDeclaredField("jar");
JarFile jar = (JarFile) getField(l, jarField);
//System.err.println("CloseableURLClassLoader: closing " + jar);
jar.close();
if (jar != null) {
//System.err.println("CloseableURLClassLoader: closing " + jar);
jar.close();
}
}
}
} catch (Throwable t) {