[
https://issues.apache.org/jira/browse/PDFBOX-5651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17753721#comment-17753721
]
ASF subversion and git services commented on PDFBOX-5651:
---------------------------------------------------------
Commit 1911626 from [email protected] in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1911626 ]
PDFBOX-5651: fix hasNext condition to avoid NoSuchElementEWxception
> Regression: NoSuchElementException in PDFXrefStreamParser
> ---------------------------------------------------------
>
> Key: PDFBOX-5651
> URL: https://issues.apache.org/jira/browse/PDFBOX-5651
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 2.0.29, 3.0.0 PDFBox
> Reporter: Andreas Lehmkühler
> Assignee: Andreas Lehmkühler
> Priority: Major
> Fix For: 2.0.30, 3.0.0 PDFBox
>
> Attachments: IT54KKRKJBTDPS2MOXLUNUDP3G2BEDGD.pdf
>
>
> Tilman ran our regressions tests due to the upcoming final release of 3.0.0.
> It reveals an issue with the PDFXrefStreamParser. I've attached one of the
> affected files
> {code}
> java.util.NoSuchElementException
> at
> org.apache.pdfbox.pdfparser.PDFXrefStreamParser$ObjectNumbers.next(PDFXrefStreamParser.java
> at
> org.apache.pdfbox.pdfparser.PDFXrefStreamParser.parse(PDFXrefStreamParser.java:129)
> at
> org.apache.pdfbox.pdfparser.COSParser.parseXrefObjStream(COSParser.java:445)
> at org.apache.pdfbox.pdfparser.COSParser.parseXref(COSParser.java:382)
> at org.apache.pdfbox.pdfparser.COSParser.retrieveTrailer(COSParser.java:225)
> at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:127)
> at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:184)
> at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:156)
> at org.apache.pdfbox.Loader.loadPDF(Loader.java:466)
> at org.apache.pdfbox.Loader.loadPDF(Loader.java:348)
> at org.apache.pdfbox.Loader.loadPDF(Loader.java:303)
> at o.a.t.parser.pdf.PDFParser.getPDDocument(PDFParser.java:499)
> at o.a.t.parser.pdf.PDFParser.getPDDocument(PDFParser.java:471)
> at o.a.t.parser.pdf.PDFParser.parse(PDFParser.java:193)
> at o.a.t.parser.CompositeParser.parse(CompositeParser.java:298)
> at o.a.t.parser.CompositeParser.parse(CompositeParser.java:298)
> at o.a.t.parser.AutoDetectParser.parse(AutoDetectParser.java:203)
> at o.a.t.parser.ParserDecorator.parse(ParserDecorator.java:152)
> at o.a.t.parser.DigestingParser.parse(DigestingParser.java:57)
> at o.a.t.parser.RecursiveParserWrapper.parse(RecursiveParserWrapper.java:164)
> at o.a.t.batch.FileResourceConsumer.parse(FileResourceConsumer.java:375)
> at
> o.a.t.batch.fs.RecursiveParserWrapperFSConsumer.processFileResource(RecursiveParserWrapperFSConsumer.java:98)
> at
> o.a.t.batch.FileResourceConsumer._processFileResource(FileResourceConsumer.java:152)
> at o.a.t.batch.FileResourceConsumer.call(FileResourceConsumer.java:87)
> at o.a.t.batch.FileResourceConsumer.call(FileResourceConsumer.java:50)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:829)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]