pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1760192 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
Date Sat, 10 Sep 2016 16:14:20 GMT
Author: tilman
Date: Sat Sep 10 16:14:20 2016
New Revision: 1760192

URL: http://svn.apache.org/viewvc?rev=1760192&view=rev
Log:
PDFBOX-2852: use foreach loop, as suggested by Simon Steiner

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java?rev=1760192&r1=1760191&r2=1760192&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
Sat Sep 10 16:14:20 2016
@@ -111,10 +111,8 @@ public abstract class PDStructureNode im
         COSBase k = this.getCOSObject().getDictionaryObject(COSName.K);
         if (k instanceof COSArray)
         {
-            Iterator<COSBase> kids = ((COSArray) k).iterator();
-            while (kids.hasNext())
+            for (COSBase kid : ((COSArray) k))
             {
-                COSBase kid = kids.next();
                 Object kidObject = this.createObject(kid);
                 if (kidObject != null)
                 {



Mime
View raw message