Merge "Add a finalize() method to StrictJarFile"

am: d0c0c8dcab

Change-Id: Iccab49c98b105aff6105e21274fbc099d10ecb55
This commit is contained in:
Neil Fuller
2016-08-09 10:49:58 +00:00
committed by android-build-merger

View File

@@ -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(),