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 2011/06/20 19:58:47 UTC
[jira] [Resolved] (PDFBOX-1030) COSWriter.visitFromStream() does
not close InputStream.
[ https://issues.apache.org/jira/browse/PDFBOX-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Lehmkühler resolved PDFBOX-1030.
----------------------------------------
Resolution: Fixed
Assignee: Andreas Lehmkühler
Thanks for the patch, although I came to the same solution ;-)
I applied the patch in revision 1137720 as proposed.
Thanks for the contribution!
> COSWriter.visitFromStream() does not close InputStream.
> -------------------------------------------------------
>
> Key: PDFBOX-1030
> URL: https://issues.apache.org/jira/browse/PDFBOX-1030
> Project: PDFBox
> Issue Type: Bug
> Components: Writing
> Affects Versions: 1.4.0, 1.5.0
> Environment: all
> Reporter: Wolfgang Glas
> Assignee: Andreas Lehmkühler
> Fix For: 1.6.0
>
> Attachments: PDFBOX-1030-1.patch
>
>
> We use pdfbox inside apache-karaf to write complex PDF files.
> Therefore we are including several COSStreams in the PDF file to be written. Some of the COSStream's use a scratch file for storing the stream content.
> Inspecting the open files of my apache-karaf unveiled, that these scratch files a still open after writing the PDDocument and closing it.
> Therefore I inspected the code inside COSWriter.visitFromStream(COSStream) and found out, the the InputStream name 'input' opened right at the beginning is never closed.
> Please add a finally-clause, which robustely closes this input stream.
> I inspected pdfbox-1.4.0 and the current SVN revision under
> http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java?revision=1092855&view=markup
> I would be very nice, if this issue could be fixed before pdfbox-1.6.0
>
> TIA and best regards, Wolfgang
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira