pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1708173 - /pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature.java
Date Mon, 12 Oct 2015 17:21:51 GMT
Author: tilman
Date: Mon Oct 12 17:21:51 2015
New Revision: 1708173

URL: http://svn.apache.org/viewvc?rev=1708173&view=rev
Log:
PDFBOX-2852: make field final, rename field

Modified:
    pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature.java

Modified: pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature.java?rev=1708173&r1=1708172&r2=1708173&view=diff
==============================================================================
--- pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature.java
(original)
+++ pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature.java
Mon Oct 12 17:21:51 2015
@@ -49,7 +49,7 @@ public class CreateVisibleSignature exte
 
     private SignatureOptions options;
     private PDVisibleSignDesigner visibleSignDesigner;
-    private PDVisibleSigProperties signatureProperties = new PDVisibleSigProperties();
+    private final PDVisibleSigProperties visibleSignatureProperties = new PDVisibleSigProperties();
 
     public void setVisibleSignatureProperties(String filename, int x, int y, int zoomPercent,

             FileInputStream image, int page) 
@@ -62,7 +62,7 @@ public class CreateVisibleSignature exte
     public void setSignatureProperties(String name, String location, String reason, int preferredSize,

             int page, boolean visualSignEnabled) throws IOException
     {
-        signatureProperties.signerName(name).signerLocation(location).signatureReason(reason).
+        visibleSignatureProperties.signerName(name).signerLocation(location).signatureReason(reason).
                 preferredSize(preferredSize).page(page).visualSignEnabled(visualSignEnabled).
                 setPdVisibleSignature(visibleSignDesigner).buildSignature();
     }
@@ -127,10 +127,10 @@ public class CreateVisibleSignature exte
         signature.setSignDate(Calendar.getInstance());
 
         // register signature dictionary and sign interface
-        if (signatureProperties != null && signatureProperties.isVisualSignEnabled())
+        if (visibleSignatureProperties != null && visibleSignatureProperties.isVisualSignEnabled())
         {
             options = new SignatureOptions();
-            options.setVisualSignature(signatureProperties);
+            options.setVisualSignature(visibleSignatureProperties);
             doc.addSignature(signature, this, options);
         }
         else



Mime
View raw message