pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1857861 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel: PDDocument.java fdf/FDFDocument.java
Date Sat, 20 Apr 2019 11:44:23 GMT
Author: tilman
Date: Sat Apr 20 11:44:23 2019
New Revision: 1857861

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

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1857861&r1=1857860&r2=1857861&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Sat Apr 20
11:44:23 2019
@@ -716,7 +716,7 @@ public class PDDocument implements Close
         if (documentInformation == null)
         {
             COSDictionary trailer = document.getTrailer();
-            COSDictionary infoDic = (COSDictionary) trailer.getDictionaryObject(COSName.INFO);
+            COSDictionary infoDic = trailer.getCOSDictionary(COSName.INFO);
             if (infoDic == null)
             {
                 infoDic = new COSDictionary();

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java?rev=1857861&r1=1857860&r2=1857861&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java Sat Apr
20 11:44:23 2019
@@ -129,7 +129,7 @@ public class FDFDocument implements Clos
     {
         FDFCatalog retval = null;
         COSDictionary trailer = document.getTrailer();
-        COSDictionary root = (COSDictionary) trailer.getDictionaryObject(COSName.ROOT);
+        COSDictionary root = trailer.getCOSDictionary(COSName.ROOT);
         if (root == null)
         {
             retval = new FDFCatalog();



Mime
View raw message