diff options
author | Gerald Palfinger <gerald.palfinger@iaik.tugraz.at> | 2022-05-06 14:01:53 +0200 |
---|---|---|
committer | Gerald Palfinger <gerald.palfinger@iaik.tugraz.at> | 2022-05-06 14:01:53 +0200 |
commit | ff7cb608cf330a282b41329a50fd2244419b999b (patch) | |
tree | 6bc7bb22c62dca67d38b471796994de78fc5345a | |
parent | 863eef9357f985936f0e72a267232fbd42315d95 (diff) | |
download | pdf-as-4-ff7cb608cf330a282b41329a50fd2244419b999b.tar.gz pdf-as-4-ff7cb608cf330a282b41329a50fd2244419b999b.tar.bz2 pdf-as-4-ff7cb608cf330a282b41329a50fd2244419b999b.zip |
Avoid printing stack trace if results is null
-rw-r--r-- | pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/placeholder/SignatureFieldsAndPlaceHolderExtractor.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/placeholder/SignatureFieldsAndPlaceHolderExtractor.java b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/placeholder/SignatureFieldsAndPlaceHolderExtractor.java index 63552c2a..609f8254 100644 --- a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/placeholder/SignatureFieldsAndPlaceHolderExtractor.java +++ b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/placeholder/SignatureFieldsAndPlaceHolderExtractor.java @@ -50,6 +50,9 @@ public class SignatureFieldsAndPlaceHolderExtractor { mode, doc); List<SignaturePlaceholderData> results = signaturePlaceholderExtractor.extractList(doc, placeholderId, mode); + if (results == null) { + return null; + } List<String> used = getExistingSignatureLocations(doc); //return first not used for(SignaturePlaceholderData result : results) { |