You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2018/10/11 18:44:23 UTC
svn commit: r1843583 -
/pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/TestPDFParser.java
Author: tilman
Date: Thu Oct 11 18:44:23 2018
New Revision: 1843583
URL: http://svn.apache.org/viewvc?rev=1843583&view=rev
Log:
PDFBOX-4338: add test
Modified:
pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/TestPDFParser.java
Modified: pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/TestPDFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/TestPDFParser.java?rev=1843583&r1=1843582&r2=1843583&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/TestPDFParser.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/TestPDFParser.java Thu Oct 11 18:44:23 2018
@@ -308,6 +308,18 @@ public class TestPDFParser
PDDocument.load(new File(TARGETPDFDIR, "genko_oc_shiryo1.pdf")).close();
}
+ /**
+ * Test parsing the file from PDFBOX-4338, which brought an
+ * ArrayIndexOutOfBoundsException before the bug was fixed.
+ *
+ * @throws IOException
+ */
+ @Test
+ public void testPDFBox4338() throws IOException
+ {
+ PDDocument.load(new File(TARGETPDFDIR, "PDFBOX-4338.pdf")).close();
+ }
+
private void executeParserTest(RandomAccessRead source, MemoryUsageSetting memUsageSetting) throws IOException
{
ScratchFile scratchFile = new ScratchFile(memUsageSetting);