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

Commit ce78eb6b 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

am: f952f520

Change-Id: I0a621a83670f326d218fe3f77bc5fe9bbad6ea6c
parents 1c47ebcf f952f520
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(),