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

Commit d0c0c8dc authored by Neil Fuller's avatar Neil Fuller Committed by Gerrit Code Review
Browse files

Merge "Add a finalize() method to StrictJarFile"

parents f61a449e b69f6147
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -175,6 +175,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(),