pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1695466 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureField.java
Date Wed, 12 Aug 2015 10:09:25 GMT
Author: msahyoun
Date: Wed Aug 12 10:09:25 2015
New Revision: 1695466

URL: http://svn.apache.org/r1695466
Log:
PDFBOX-2932: avoid NPE when field has no value

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureField.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureField.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureField.java?rev=1695466&r1=1695465&r2=1695466&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureField.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureField.java
Wed Aug 12 10:09:25 2015
@@ -164,7 +164,8 @@ public class PDSignatureField extends PD
     @Override
     public String getValueAsString()
     {
-        return getValue().toString();
+        PDSignature signature = getValue();
+        return signature != null ? signature.toString() : "";
     }
 
     /**



Mime
View raw message