pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1843182 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
Date Mon, 08 Oct 2018 18:40:15 GMT
Author: tilman
Date: Mon Oct  8 18:40:15 2018
New Revision: 1843182

URL: http://svn.apache.org/viewvc?rev=1843182&view=rev
Log:
PDFBOX-4333: avoid ClassCastException

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java?rev=1843182&r1=1843181&r2=1843182&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java Mon
Oct  8 18:40:15 2018
@@ -2334,6 +2334,11 @@ public class COSParser extends BaseParse
             List<? extends COSBase> kidsList = kidsArray.toList();
             for (COSBase kid : kidsList)
             {
+                if (!(kid instanceof COSObject))
+                {
+                    kidsArray.remove(kid);
+                    continue;
+                }
                 COSObject kidObject = (COSObject) kid;
                 if (set.contains(kidObject))
                 {



Mime
View raw message