valerybokov commented on PR #107: URL: https://github.com/apache/pdfbox/pull/107#issuecomment-1606049748
> > Hi, @lehmi! Have a question about your commit PDFBOX-5551: replace malformed (sub)stream with an empty one, DRY git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1910585 13f79535-47bb-0310-9956-ffa450edef68. PDPage.getContentsForRandomAccess method. Line 194. If substream is malformed and you wrote "it will be skipped" then why you didn't remove it from inputStreams list? > > I had two reasons in my mind. First of all in the case of a content stream which consists of several streams I didn't want to change the number of substreams so that the number of substreams is still in line with the number of COSArray elements. And in the case of a content streams which has only one stream I prefer to return an empty stream instead of returning null so that we don't have to change the code processing the stream It looks like, if the exception will be thrown then last item will not be added. Is it expected behaviour? -- 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-unsubscr...@pdfbox.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org