Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f952f520 authored by Neil Fuller's avatar Neil Fuller Committed by android-build-merger
Browse files

Merge "Add a finalize() method to StrictJarFile" am: d0c0c8dc

am: 2ffb7eba

Change-Id: Ie947e8447ecd8e9a61b6d1115174180e41d74311
parents 62360649 2ffb7eba
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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(),