[ 
https://issues.apache.org/jira/browse/JCRVLT-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17474473#comment-17474473
 ] 

Konrad Windszus edited comment on JCRVLT-590 at 1/12/22, 12:00 PM:
-------------------------------------------------------------------

bq. ...switch that use to "just log for debug purposes"

That will lead to a lot of false positives, as it is not trivial to detect 
whether closing is actually necessary or not (it may be that the underlying 
archive has been closed already, and there is no isClosed() method on the 
archive interface). Doing this logging right, requires a lot of additional code 
and is IMHO not worth the effort.


was (Author: kwin):
> switch that use to "just log for debug purposes"

That will lead to a lot of false positives, as it is not trivial to detect 
whether closing is actually necessary or not (it may be that the underlying 
archive has been closed already, and there is no isClosed() method on the 
archive interface). Doing this logging right, requires a lot of additional code 
and is IMHO not worth the effort.

> 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. Finalizer have some issue 
> and are deprecated since Java 9 
> (https://bugs.openjdk.java.net/browse/JDK-8165641).



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to