[
https://issues.apache.org/jira/browse/PDFBOX-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Hewson updated PDFBOX-1167:
--------------------------------
Component/s: Documentation
> PDFStreamEngine#processSubStream should throw original IOException instead of
> RuntimeException + FIX
> ----------------------------------------------------------------------------------------------------
>
> Key: PDFBOX-1167
> URL: https://issues.apache.org/jira/browse/PDFBOX-1167
> Project: PDFBox
> Issue Type: Improvement
> Components: Documentation
> Affects Versions: 1.7.0
> Reporter: Timo Boehme
> Priority: Minor
> Attachments: PDFStreamEngine_processSubStream.java
>
>
> PDFStreamEngine#processSubStream(COSStream) uses TokenIterator from
> PDFStreamParser. This iterator when called hasNext() might face an
> IOException which it wraps insight a RuntimeException (because hasNext has no
> declared exceptions). Now when such an IOException occurs it normally won't
> be handled by any calling class because only IOException is declared to be
> thrown but none of the classes is prepared to handle RuntimeException.
> Therefore within the mentioned method processSubStream the RuntimeException
> should be catched and tested for embedded IOException. In this case the
> IOException should be thrown.
> I will attach the processSubStream method with the added catch block (method
> taken from rev. 1163297).
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)