You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "valerybokov (via GitHub)" <gi...@apache.org> on 2026/08/27 19:43:53 UTC
[PR] do not close the stream inside CCITTFactory.extractFromTiff method [pdfbox]
valerybokov opened a new pull request, #501:
URL: https://github.com/apache/pdfbox/pull/501
This code doesn't throw an IOException or other error, but the code structure is incorrect. It is fragile. We write data to the output stream in the extractFromTiff method, close it, and then read the data from outside in the createFromRandomAccessImpl method. But the stream is closed. We can do it only because this is ByteArrayOutputStream. If we change the stream type then there will be an exception.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
Re: [PR] do not close the stream inside CCITTFactory.extractFromTiff method [pdfbox]
Posted by "asf-gitbox-commits (via GitHub)" <gi...@apache.org>.
asf-gitbox-commits closed pull request #501: do not close the stream inside CCITTFactory.extractFromTiff method
URL: https://github.com/apache/pdfbox/pull/501
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
Re: [PR] do not close the stream inside CCITTFactory.extractFromTiff method [pdfbox]
Posted by "THausherr (via GitHub)" <gi...@apache.org>.
THausherr commented on PR #501:
URL: https://github.com/apache/pdfbox/pull/501#issuecomment-5451317945
Thank you. It turns out I introduced this in 2014 (before that the close was needed). I didn't use the PR, I remove the close manually, hopefully that is the same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org