pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1759702 - /pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java
Date Wed, 07 Sep 2016 20:53:36 GMT
Author: tilman
Date: Wed Sep  7 20:53:35 2016
New Revision: 1759702

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

Modified:
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java

Modified: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java?rev=1759702&r1=1759701&r2=1759702&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/WriteDecodedDoc.java Wed Sep
 7 20:53:35 2016
@@ -19,7 +19,6 @@ package org.apache.pdfbox.tools;
 import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
-import java.util.Iterator;
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.cos.COSObject;
@@ -62,9 +61,9 @@ public class WriteDecodedDoc
         {
             doc = PDDocument.load(new File(in), password);
             doc.setAllSecurityToBeRemoved(true);
-            for (Iterator<COSObject> i = doc.getDocument().getObjects().iterator();
i.hasNext();)
+            for (COSObject cosObject : doc.getDocument().getObjects())
             {
-                COSBase base = i.next().getObject();
+                COSBase base = cosObject.getObject();
                 if (base instanceof COSStream)
                 {
                     COSStream stream = (COSStream)base;



Mime
View raw message