Author: msahyoun
Date: Sat Apr 14 12:28:18 2018
New Revision: 1829135

URL: http://svn.apache.org/viewvc?rev=1829135&view=rev
Log:
PDFBOX-3809: add missing test for hasMissingPageRef before LOG statement

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

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java?rev=1829135&r1=1829134&r2=1829135&view=diff
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java
 (original)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java
 Sat Apr 14 12:28:18 2018
@@ -803,7 +803,10 @@ public final class PDAcroForm implements
         // TODO: if there is a widget with a missing page reference 
         // we'd need to build the map reverse i.e. form the annotations to the 
         // widget. But this will be much slower so will be omitted for now.
-        LOG.warn("There has been a widget with a missing page reference. 
Please report to the PDFBox project");
+        if (hasMissingPageRef)
+        {
+            LOG.warn("There has been a widget with a missing page reference. 
Please report to the PDFBox project");
+        }
         
         return pagesAnnotationsMap;
     }


Reply via email to