pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1824633 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java
Date Sat, 17 Feb 2018 20:14:41 GMT
Author: tilman
Date: Sat Feb 17 20:14:41 2018
New Revision: 1824633

URL: http://svn.apache.org/viewvc?rev=1824633&view=rev
Log:
PDFBOX-4071: simplify code

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java?rev=1824633&r1=1824632&r2=1824633&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java Sat
Feb 17 20:14:41 2018
@@ -711,9 +711,9 @@ public class PDFMergerUtility
             throws IOException
     {
         List<PDField> srcFields = srcAcroForm.getFields();
-        COSArray destFields = null;
+        COSArray destFields;
 
-        if (srcFields != null && srcFields.size() > 0)
+        if (srcFields != null && !srcFields.isEmpty())
         {
             // if a form is merged multiple times using PDFBox the newly generated
             // fields starting with dummyFieldName may already exist. We need to determine
the last unique 



Mime
View raw message