Plug a `JarInputStream` resource leak

This commit is contained in:
Ben Liblit 2017-08-16 11:09:55 -05:00 committed by Manu Sridharan
parent 6ebbb834b9
commit 4cb4273ff9
1 changed files with 1 additions and 2 deletions

View File

@ -57,8 +57,7 @@ public abstract class AbstractNestedJarFileModule implements Module {
return;
}
cache = HashMapFactory.make();
try {
final JarInputStream stream = new JarInputStream(getNestedContents(), false);
try (final JarInputStream stream = new JarInputStream(getNestedContents(), false)) {
for (ZipEntry z = stream.getNextEntry(); z != null; z = stream.getNextEntry()) {
final String name = z.getName();
if (DEBUG) {