pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremias Maerki (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (PDFBOX-507) [PATCH] Option to disable close warning in finalizer of COSDocument.
Date Fri, 28 Aug 2009 13:08:59 GMT

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

Jeremias Maerki resolved PDFBOX-507.
------------------------------------

    Resolution: Fixed
      Assignee: Jeremias Maerki

Applied: http://svn.apache.org/viewvc?rev=808878&view=rev

> [PATCH] Option to disable close warning in finalizer of COSDocument.
> --------------------------------------------------------------------
>
>                 Key: PDFBOX-507
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-507
>             Project: PDFBox
>          Issue Type: Improvement
>    Affects Versions: 0.8.0-incubator
>            Reporter: Jeremias Maerki
>            Assignee: Jeremias Maerki
>             Fix For: 0.8.0-incubator
>
>         Attachments: COSDocumentFinalizerPatch.diff
>
>
> I'm using PDFBox in a FOP plug-in to embed PDF documents. The PDF images are cached in
memory through soft references. Therefore I do not know exactly when the COSDocument needs
to be closed. I do close it in the holder's finalize() method but the garbage collector sometimes
calls the COSDocument's finalizer before I have a chance to close it myself. With this patch
I'd like to introduce an option that lets me disable the warning and do a close() in the finalizer
in any case. I do think that the warning can be helpful for newbies (closing early is a good
idea when that's possible) but the warning to System.err is a problem in my case.
> If noone objects within 72 hours, I'm happy to apply the patch myself.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message