pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1654373 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDictionary.java
Date Fri, 23 Jan 2015 20:35:42 GMT
Author: tilman
Date: Fri Jan 23 20:35:41 2015
New Revision: 1654373

URL: http://svn.apache.org/r1654373
Log:
PDFBOX-2576: merge if statements

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDictionary.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDictionary.java?rev=1654373&r1=1654372&r2=1654373&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDictionary.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDictionary.java Fri
Jan 23 20:35:41 2015
@@ -84,7 +84,6 @@ public class FDFDictionary implements CO
                     PDSimpleFileSpecification fs = new PDSimpleFileSpecification();
                     fs.setFile( child.getAttribute( "href" ) );
                     setFile(fs);
-
                 }
                 else if( child.getTagName().equals( "ids" ) )
                 {
@@ -102,12 +101,9 @@ public class FDFDictionary implements CO
                     for( int f=0; f<fields.getLength(); f++ )
                     {
                         Node currentNode = fields.item( f );
-                        if (currentNode instanceof Element) 
+                        if (currentNode instanceof Element && ((Element) currentNode).getTagName().equals("field"))
                         {
-                            if (((Element)currentNode).getTagName().equals("field")) 
-                            {
-                                fieldList.add( new FDFField( (Element)fields.item( f ) )
);
-                            }
+                            fieldList.add(new FDFField((Element) fields.item(f)));
                         }
                     }
                     setFields( fieldList );
@@ -177,6 +173,7 @@ public class FDFDictionary implements CO
      *
      * @return The cos object that matches this Java object.
      */
+    @Override
     public COSBase getCOSObject()
     {
         return fdf;



Mime
View raw message