You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (Jira)" <ji...@apache.org> on 2021/04/21 17:36:00 UTC

[jira] [Resolved] (PDFBOX-5136) Remove COSDocument#finalize

     [ https://issues.apache.org/jira/browse/PDFBOX-5136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler resolved PDFBOX-5136.
----------------------------------------
    Resolution: Fixed

I've decided to leave the 2.0-branch unchanged to avoid possible side effects due to the differences within the implementation

> Remove COSDocument#finalize
> ---------------------------
>
>                 Key: PDFBOX-5136
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5136
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Parsing, PDModel
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: Andreas Lehmkühler
>            Assignee: Andreas Lehmkühler
>            Priority: Major
>             Fix For: 3.0.0 PDFBox
>
>
> PDDocument implements the Closeable interface a closes the underlying instance of COSDocument once it is closed itself, so that there is no need to use the finalize method to perform a sanity check about not closed resources. Furthermore it is a bad idea to overwrite finalize for different good reasons. See PDFBOX-4202 for some additional information



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org