Merge "Add a finalize() method to StrictJarFile" am: d0c0c8dcab
am: 2ffb7ebae2
Change-Id: Ie947e8447ecd8e9a61b6d1115174180e41d74311
This commit is contained in:
@@ -200,6 +200,18 @@ public final class StrictJarFile {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
try {
|
||||
if (guard != null) {
|
||||
guard.warnIfOpen();
|
||||
}
|
||||
close();
|
||||
} finally {
|
||||
super.finalize();
|
||||
}
|
||||
}
|
||||
|
||||
private InputStream getZipInputStream(ZipEntry ze) {
|
||||
if (ze.getMethod() == ZipEntry.STORED) {
|
||||
return new RAFStream(raf, ze.getDataOffset(),
|
||||
|
||||
Reference in New Issue
Block a user