Modified: 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java
 Fri Sep 16 11:17:35 2016
@@ -2817,8 +2817,8 @@ public class TTXFile {
         private boolean hasMissingCoverage(GlyphCoverageTable[] gca) {
             assert gca != null;
             int nc = 0;
-            for (int i = 0, n = gca.length; i < n; i++) {
-                if (gca [ i ] != null) {
+            for (GlyphCoverageTable aGca : gca) {
+                if (aGca != null) {
                     nc++;
                 }
             }
@@ -3131,8 +3131,7 @@ public class TTXFile {
         }
         private Integer computeClassCount(Anchor[][] am) {
             int ncMax = 0;
-            for (int i = 0, n = am.length; i < n; i++) {
-                Anchor[] aa = am [ i ];
+            for (Anchor[] aa : am) {
                 if (aa != null) {
                     int nc = aa.length;
                     if (nc > ncMax) {

Modified: 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java
 Fri Sep 16 11:17:35 2016
@@ -47,10 +47,10 @@ public class RowGroupBuilderTestCase ext
      */
     private void checkTablePartRowGroups(TablePart part, int[] 
expectedRowLengths) {
         Iterator rowGroupIter = part.getRowGroups().iterator();
-        for (int i = 0; i < expectedRowLengths.length; i++) {
+        for (int expectedRowLength : expectedRowLengths) {
             assertTrue(rowGroupIter.hasNext());
             List rowGroup = (List) rowGroupIter.next();
-            assertEquals(expectedRowLengths[i], rowGroup.size());
+            assertEquals(expectedRowLength, rowGroup.size());
         }
         assertFalse(rowGroupIter.hasNext());
     }
@@ -78,9 +78,9 @@ public class RowGroupBuilderTestCase ext
             checkTablePartRowGroups(table.getTableFooter(), 
expectedFooterRowLengths);
         }
         Iterator bodyIter = table.getChildNodes();
-        for (int i = 0; i < expectedBodyRowLengths.length; i++) {
+        for (int[] expectedBodyRowLength : expectedBodyRowLengths) {
             assertTrue(bodyIter.hasNext());
-            checkTablePartRowGroups((TableBody) bodyIter.next(), 
expectedBodyRowLengths[i]);
+            checkTablePartRowGroups((TableBody) bodyIter.next(), 
expectedBodyRowLength);
         }
     }
 

Modified: 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java
 Fri Sep 16 11:17:35 2016
@@ -140,8 +140,8 @@ public class FOTreeTestCase {
 
             List<String> results = collector.getResults();
             if (results.size() > 0) {
-                for (int i = 0; i < results.size(); i++) {
-                    System.out.println(results.get(i));
+                for (String result : results) {
+                    System.out.println(result);
                 }
                 throw new IllegalStateException(results.get(0));
             }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java
 Fri Sep 16 11:17:35 2016
@@ -61,8 +61,8 @@ public class CreateTestDocuments {
             throw new IOException("output directory (" + outDir + ") must 
exist and be writable");
         }
 
-        for (int i = 0; i < CLASS_NAMES.length; i++) {
-            createOneTestDocument(CLASS_NAMES[i], outDir);
+        for (String className : CLASS_NAMES) {
+            createOneTestDocument(className, outDir);
         }
     }
 

Modified: 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/threading/FOPTestbed.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/threading/FOPTestbed.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/threading/FOPTestbed.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/threading/FOPTestbed.java
 Fri Sep 16 11:17:35 2016
@@ -71,8 +71,8 @@ public class FOPTestbed extends Abstract
         Configuration tasks = configuration.getChild("tasks");
         this.repeat = tasks.getAttributeAsInteger("repeat", 1);
         Configuration[] entries = tasks.getChildren("task");
-        for (int i = 0; i < entries.length; i++) {
-            this.taskList.add(new TaskDef(entries[i]));
+        for (Configuration entry : entries) {
+            this.taskList.add(new TaskDef(entry));
         }
         this.fopCfg = configuration.getChild("processor");
     }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/util/DigestFilter.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/util/DigestFilter.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/util/DigestFilter.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/util/DigestFilter.java
 Fri Sep 16 11:17:35 2016
@@ -21,7 +21,6 @@ package org.apache.fop.util;
 
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.TreeMap;
 
@@ -57,8 +56,7 @@ public class DigestFilter extends XMLFil
     public String getDigestString() {
         if (value != null) {
             StringBuffer buffer = new StringBuffer(2 * value.length);
-            for (int i = 0; i < value.length; i++) {
-                int val = value[i];
+            for (byte val : value) {
                 int hi = (val >> 4) & 0xF;
                 int lo = val & 0xF;
                 if (hi < 10) {
@@ -116,10 +114,10 @@ public class DigestFilter extends XMLFil
                 map.put(attr.getQName(i), attr.getValue(i));
             }
         }
-        for (Iterator i = map.entrySet().iterator(); i.hasNext();) {
-            Map.Entry entry = (Map.Entry)i.next();
-            digest.update(((String)entry.getKey()).getBytes());
-            digest.update(((String)entry.getValue()).getBytes());
+        for (Object o : map.entrySet()) {
+            Map.Entry entry = (Map.Entry) o;
+            digest.update(((String) entry.getKey()).getBytes());
+            digest.update(((String) entry.getValue()).getBytes());
         }
         super.startElement(url, localName, qName, attr);
     }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/visual/BitmapComparator.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/visual/BitmapComparator.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/visual/BitmapComparator.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/visual/BitmapComparator.java
 Fri Sep 16 11:17:35 2016
@@ -132,13 +132,13 @@ public final class BitmapComparator {
         g.setPaint(Color.white);
         g.fillRect(0, 0, cmp.getWidth(), cmp.getHeight());
         int lastWidth = 0;
-        for (int i = 0; i < images.length; i++) {
+        for (BufferedImage image : images) {
             if (lastWidth > 0) {
                 g.translate(lastWidth, 0);
             }
-            if (images[i] != null) {
-                g.drawImage(images[i], 0, 0, null);
-                lastWidth = images[i].getWidth();
+            if (image != null) {
+                g.drawImage(image, 0, 0, null);
+                lastWidth = image.getWidth();
             } else {
                 lastWidth = 20; //Maybe add a special placeholder image 
instead later
             }

Modified: 
xmlgraphics/fop/trunk/fop-events/src/main/java/org/apache/fop/events/DefaultEventBroadcaster.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-events/src/main/java/org/apache/fop/events/DefaultEventBroadcaster.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-events/src/main/java/org/apache/fop/events/DefaultEventBroadcaster.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-events/src/main/java/org/apache/fop/events/DefaultEventBroadcaster.java
 Fri Sep 16 11:17:35 2016
@@ -104,8 +104,8 @@ public class DefaultEventBroadcaster imp
     }
 
     private static synchronized EventProducerModel getEventProducerModel(Class 
clazz) {
-        for (int i = 0, c = eventModels.size(); i < c; i++) {
-            EventModel eventModel = (EventModel)eventModels.get(i);
+        for (Object eventModel1 : eventModels) {
+            EventModel eventModel = (EventModel) eventModel1;
             EventProducerModel producerModel = eventModel.getProducer(clazz);
             if (producerModel != null) {
                 return producerModel;

Modified: 
xmlgraphics/fop/trunk/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java
 Fri Sep 16 11:17:35 2016
@@ -93,8 +93,7 @@ class EventProducerCollector {
         builder.addSource(src);
         JavaClass[] classes = builder.getClasses();
         boolean eventProducerFound = false;
-        for (int i = 0, c = classes.length; i < c; i++) {
-            JavaClass clazz = classes[i];
+        for (JavaClass clazz : classes) {
             if (clazz.isInterface() && implementsInterface(clazz, 
CLASSNAME_EVENT_PRODUCER)) {
                 processEventProducerInterface(clazz);
                 eventProducerFound = true;
@@ -105,8 +104,7 @@ class EventProducerCollector {
 
     private boolean implementsInterface(JavaClass clazz, String intf) {
         JavaClass[] classes = clazz.getImplementedInterfaces();
-        for (int i = 0, c = classes.length; i < c; i++) {
-            JavaClass cl = classes[i];
+        for (JavaClass cl : classes) {
             if (cl.getFullyQualifiedName().equals(intf)) {
                 return true;
             }
@@ -124,8 +122,7 @@ class EventProducerCollector {
                 throws EventConventionException, ClassNotFoundException {
         EventProducerModel prodMeta = new 
EventProducerModel(clazz.getFullyQualifiedName());
         JavaMethod[] methods = clazz.getMethods(true);
-        for (int i = 0, c = methods.length; i < c; i++) {
-            JavaMethod method = methods[i];
+        for (JavaMethod method : methods) {
             EventMethodModel methodMeta = createMethodModel(method);
             prodMeta.addMethod(methodMeta);
         }

Modified: 
xmlgraphics/fop/trunk/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollectorTask.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollectorTask.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollectorTask.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollectorTask.java
 Fri Sep 16 11:17:35 2016
@@ -67,8 +67,7 @@ public class EventProducerCollectorTask
         try {
             EventProducerCollector collector = new EventProducerCollector();
             long lastModified = processFileSets(collector);
-            for (Iterator iter = collector.getModels().iterator(); 
iter.hasNext();) {
-                EventModel model = (EventModel) iter.next();
+            for (EventModel model : collector.getModels()) {
                 File parentDir = getParentDir(model);
                 if (!parentDir.exists() && !parentDir.mkdirs()) {
                     throw new BuildException(
@@ -208,8 +207,7 @@ public class EventProducerCollectorTask
             DirectoryScanner ds = fs.getDirectoryScanner(getProject());
             String[] srcFiles = ds.getIncludedFiles();
             File directory = fs.getDir(getProject());
-            for (int i = 0, c = srcFiles.length; i < c; i++) {
-                String filename = srcFiles[i];
+            for (String filename : srcFiles) {
                 File src = new File(directory, filename);
                 boolean eventProducerFound = collector.scanFile(src);
                 if (eventProducerFound) {



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-h...@xmlgraphics.apache.org

Reply via email to