You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2019/11/21 19:27:50 UTC

svn commit: r1870115 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationStamp.java

Author: tilman
Date: Thu Nov 21 19:27:50 2019
New Revision: 1870115

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

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationStamp.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationStamp.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationStamp.java?rev=1870115&r1=1870114&r2=1870115&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationStamp.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationStamp.java Thu Nov 21 19:27:50 2019
@@ -310,39 +310,34 @@ public class FDFAnnotationStamp extends
                 String childAttrVal = child.getAttribute("VAL");
                 LOG.debug(parentAttrKey + " => reading child: " + child.getTagName() +
                            " with key: " + childAttrKey);
-                if ("INT".equalsIgnoreCase(child.getTagName()))
+                if ("INT".equalsIgnoreCase(child.getTagName()) || "FIXED".equalsIgnoreCase(child.getTagName()))
                 {
-                    LOG.debug(parentAttrKey + " value(" + i + "): " + child.getAttribute("VAL"));
-                    array.add(COSNumber.get(childAttrVal));
-                }
-                else if ("FIXED".equalsIgnoreCase(child.getTagName()))
-                {
-                    LOG.debug(parentAttrKey + " value(" + i + "): " + child.getAttribute("VAL"));
+                    LOG.debug(parentAttrKey + " value(" + i + "): " + childAttrVal);
                     array.add(COSNumber.get(childAttrVal));
                 }
                 else if ("NAME".equalsIgnoreCase(child.getTagName()))
                 {
-                    LOG.debug(parentAttrKey + " value(" + i + "): " + child.getAttribute("VAL"));
+                    LOG.debug(parentAttrKey + " value(" + i + "): " + childAttrVal);
                     array.add(COSName.getPDFName(childAttrVal));
                 }
                 else if ("BOOL".equalsIgnoreCase(child.getTagName()))
                 {
-                    LOG.debug(parentAttrKey + " value(" + i + "): " + child.getAttribute("VAL"));
+                    LOG.debug(parentAttrKey + " value(" + i + "): " + childAttrVal);
                     array.add(COSBoolean.getBoolean(Boolean.parseBoolean(childAttrVal)));
                 }
                 else if ("DICT".equalsIgnoreCase(child.getTagName()))
                 {
-                    LOG.debug(parentAttrKey + " value(" + i + "): " + child.getAttribute("VAL"));
+                    LOG.debug(parentAttrKey + " value(" + i + "): " + childAttrVal);
                     array.add(parseDictElement(child));
                 }
                 else if ("STREAM".equalsIgnoreCase(child.getTagName()))
                 {
-                    LOG.debug(parentAttrKey + " value(" + i + "): " + child.getAttribute("VAL"));
+                    LOG.debug(parentAttrKey + " value(" + i + "): " + childAttrVal);
                     array.add(parseStreamElement(child));
                 }
                 else if ("ARRAY".equalsIgnoreCase(child.getTagName()))
                 {
-                    LOG.debug(parentAttrKey + " value(" + i + "): " + child.getAttribute("VAL"));
+                    LOG.debug(parentAttrKey + " value(" + i + "): " + childAttrVal);
                     array.add(parseArrayElement(child));
                 }
                 else