pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1674981 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
Date Mon, 20 Apr 2015 20:44:54 GMT
Author: tilman
Date: Mon Apr 20 20:44:53 2015
New Revision: 1674981

URL: http://svn.apache.org/r1674981
Log:
PDFBOX-2576: use double line only once

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=1674981&r1=1674980&r2=1674981&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 Mon Apr 20
20:44:53 2015
@@ -316,6 +316,7 @@ public class PDDocument implements Close
                 COSBase base = cosObject.getObject();
                 if (base instanceof COSDictionary)
                 {
+                    COSDictionary cosBaseDict = (COSDictionary) base;
                     COSBase ft = ((COSDictionary) base).getItem(COSName.FT);
                     COSBase type = ((COSDictionary) base).getItem(COSName.TYPE);
                     COSBase apDict = ((COSDictionary) base).getItem(COSName.AP);
@@ -323,8 +324,6 @@ public class PDDocument implements Close
                     // Search for signature annotation
                     if (annotNotFound && COSName.ANNOT.equals(type))
                     {
-                        COSDictionary cosBaseDict = (COSDictionary) base;
-
                         // Read and set the Rectangle for visual signature
                         COSArray rectAry = (COSArray) cosBaseDict.getItem(COSName.RECT);
                         PDRectangle rect = new PDRectangle(rectAry);
@@ -335,8 +334,6 @@ public class PDDocument implements Close
                     // Search for Signature-Field
                     if (sigFieldNotFound && COSName.SIG.equals(ft) && apDict
!= null)
                     {
-                        COSDictionary cosBaseDict = (COSDictionary) base;
-
                         // read and set Appearance Dictionary
                         PDAppearanceDictionary ap = 
                                 new PDAppearanceDictionary((COSDictionary)cosBaseDict.getDictionaryObject(COSName.AP));



Mime
View raw message