pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1675779 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java
Date Fri, 24 Apr 2015 05:30:00 GMT
Author: tilman
Date: Fri Apr 24 05:30:00 2015
New Revision: 1675779

URL: http://svn.apache.org/r1675779
Log:
PDFBOX-2773: deref to avoid ClassCastException

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java?rev=1675779&r1=1675778&r2=1675779&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java
Fri Apr 24 05:30:00 2015
@@ -24,6 +24,7 @@ import org.apache.pdfbox.cos.COSArray;
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSDictionary;
 import org.apache.pdfbox.cos.COSName;
+import org.apache.pdfbox.cos.COSObject;
 import org.apache.pdfbox.cos.COSStream;
 import org.apache.pdfbox.pdmodel.common.COSArrayList;
 import org.apache.pdfbox.pdmodel.common.COSObjectable;
@@ -455,6 +456,10 @@ public class PDDocumentCatalog implement
         if (array!=null) {
             for (COSBase cosBase : array)
             {
+                if (cosBase instanceof COSObject)
+                {
+                    cosBase = ((COSObject)cosBase).getObject();
+                }
                 PDOutputIntent oi = new PDOutputIntent((COSDictionary)cosBase);
                 retval.add(oi);
             }



Mime
View raw message