pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1670758 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
Date Wed, 01 Apr 2015 19:32:42 GMT
Author: tilman
Date: Wed Apr  1 19:32:42 2015
New Revision: 1670758

URL: http://svn.apache.org/r1670758
Log:
PDFBOX-2576: remove unneeded cast

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.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=1670758&r1=1670757&r2=1670758&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 Wed Apr  1
19:32:42 2015
@@ -38,7 +38,6 @@ import org.apache.pdfbox.cos.COSInteger;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSObject;
 import org.apache.pdfbox.cos.COSStream;
-import org.apache.pdfbox.cos.COSUpdateInfo;
 import org.apache.pdfbox.io.IOUtils;
 import org.apache.pdfbox.io.RandomAccessBufferedFileInputStream;
 import org.apache.pdfbox.pdfparser.BaseParser;
@@ -262,7 +261,7 @@ public class PDDocument implements Close
         for (PDFieldTreeNode field : acroFormFields)
         {
             if (field instanceof PDSignatureField
-                    && ((PDSignatureField) field).getCOSObject().equals(signatureField.getCOSObject()))
+                    && field.getCOSObject().equals(signatureField.getCOSObject()))
             {
                 checkFields = true;
                 signatureField.getDictionary().setNeedToBeUpdated(true);
@@ -372,7 +371,7 @@ public class PDDocument implements Close
         {
             annotations.add(signatureField.getWidget());
         }
-        ((COSUpdateInfo)page.getCOSObject()).setNeedToBeUpdated(true);
+        page.getCOSObject().setNeedToBeUpdated(true);
     }
 
     /**
@@ -387,7 +386,7 @@ public class PDDocument implements Close
             SignatureOptions options) throws IOException
     {
         PDDocumentCatalog catalog = getDocumentCatalog();
-        ((COSUpdateInfo) catalog.getCOSObject()).setNeedToBeUpdated(true);
+        catalog.getCOSObject().setNeedToBeUpdated(true);
 
         PDAcroForm acroForm = catalog.getAcroForm();
         if (acroForm == null)



Mime
View raw message