You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Wolfgang Glas (JIRA)" <ji...@apache.org> on 2011/06/04 18:34:47 UTC
[jira] [Created] (PDFBOX-1030) COSWriter.visitFromStream() does not
close InputStream.
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.5.0, 1.4.0
Environment: all
Reporter: Wolfgang Glas
Fix For: 1.6.0
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
[jira] [Resolved] (PDFBOX-1030) COSWriter.visitFromStream() does
not close InputStream.
Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Updated] (PDFBOX-1030) COSWriter.visitFromStream() does not
close InputStream.
Posted by "Wolfgang Glas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wolfgang Glas updated PDFBOX-1030:
----------------------------------
Attachment: PDFBOX-1030-1.patch
Patch to close the temporary input stream.
> 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
> 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
[jira] [Commented] (PDFBOX-1030) COSWriter.visitFromStream() does
not close InputStream.
Posted by "Wolfgang Glas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051933#comment-13051933 ]
Wolfgang Glas commented on PDFBOX-1030:
---------------------------------------
Andreas, does it help, when I work out a patch for this issue?
I'd really love to see a release pdf-box-1.6.0 and will do my best to help you as far as I'm eligible to do so.
Best regards, Wolfgang
> 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
> Fix For: 1.6.0
>
>
> 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
[jira] [Commented] (PDFBOX-1030) COSWriter.visitFromStream() does
not close InputStream.
Posted by "Wolfgang Glas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052164#comment-13052164 ]
Wolfgang Glas commented on PDFBOX-1030:
---------------------------------------
Andreas,
ThX for applying and good luck for the 1.6.0 release ;-)
Wolfgang
> 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