[ https://issues.apache.org/jira/browse/JCRVLT-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17474438#comment-17474438 ]
Konrad Windszus commented on JCRVLT-590: ---------------------------------------- Reporting unclosed packages/archives requires quite some code changes, as not every close() method is strictly mandatory (see the javadoc changes in the linked PR). The problem with the finalizer is that is has a GC impact (even if almost empty) and has been deprecated in Java 9 for several reasons (https://medium.com/javarevisited/time-to-say-goodbye-to-the-finalize-method-in-java-a2f5b7e4f1b1). Just keeping it for reporting unclosed is quite some overhead. Also Oak never implemented such a mechanism for unclosed sessions (compare with https://issues.apache.org/jira/browse/OAK-1349 and https://issues.apache.org/jira/browse/JCR-2768). > Remove finalizer in ZipVaultPackage > ----------------------------------- > > Key: JCRVLT-590 > URL: https://issues.apache.org/jira/browse/JCRVLT-590 > Project: Jackrabbit FileVault > Issue Type: Improvement > Components: vlt > Reporter: Konrad Windszus > Assignee: Konrad Windszus > Priority: Major > Fix For: 3.5.10 > > > Instead of relying on the finalizer in > https://github.com/apache/jackrabbit-filevault/blob/561aaa092d721963f16b860de955e6d1752a350e/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/ZipVaultPackage.java#L322-L329, > every ZipVaultPackage should be explicitly closed -- This message was sent by Atlassian Jira (v8.20.1#820001)