From ff7cb608cf330a282b41329a50fd2244419b999b Mon Sep 17 00:00:00 2001 From: Gerald Palfinger Date: Fri, 6 May 2022 14:01:53 +0200 Subject: Avoid printing stack trace if results is null --- .../pdfbox2/placeholder/SignatureFieldsAndPlaceHolderExtractor.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib') 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 results = signaturePlaceholderExtractor.extractList(doc, placeholderId, mode); + if (results == null) { + return null; + } List used = getExistingSignatureLocations(doc); //return first not used for(SignaturePlaceholderData result : results) { -- cgit v1.2.3