Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java
 Fri Sep 16 11:17:35 2016
@@ -109,8 +109,7 @@ public abstract class ScriptProcessor {
      */
     public GlyphSequence substitute(GlyphSequence gs, String script, String 
language, GlyphTable.UseSpec[] usa, ScriptContextTester sct) {
         assert usa != null;
-        for (int i = 0, n = usa.length; i < n; i++) {
-            GlyphTable.UseSpec us = usa [ i ];
+        for (GlyphTable.UseSpec us : usa) {
             gs = us.substitute(gs, script, language, sct);
         }
         return gs;
@@ -186,8 +185,7 @@ public abstract class ScriptProcessor {
     public boolean position(GlyphSequence gs, String script, String language, 
int fontSize, GlyphTable.UseSpec[] usa, int[] widths, int[][] adjustments, 
ScriptContextTester sct) {
         assert usa != null;
         boolean adjusted = false;
-        for (int i = 0, n = usa.length; i < n; i++) {
-            GlyphTable.UseSpec us = usa [ i ];
+        for (GlyphTable.UseSpec us : usa) {
             if (us.position(gs, script, language, fontSize, widths, 
adjustments, sct)) {
                 adjusted = true;
             }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/CharAssociation.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/CharAssociation.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/CharAssociation.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/CharAssociation.java
 Fri Sep 16 11:17:35 2016
@@ -358,8 +358,7 @@ public class CharAssociation implements
      */
     private static int[] extractIntervals(CharAssociation[] aa) {
         int ni = 0;
-        for (int i = 0, n = aa.length; i < n; i++) {
-            CharAssociation a = aa [ i ];
+        for (CharAssociation a : aa) {
             if (a.isDisjoint()) {
                 ni += a.getSubIntervalCount();
             } else {
@@ -401,25 +400,25 @@ public class CharAssociation implements
         assert sa.length == ea.length;
         int ni = sa.length;
         int[] incr = (ni < 21) ? SORT_INCREMENTS_03 : SORT_INCREMENTS_16;
-        for (int k = 0; k < incr.length; k++) {
-            for (int h = incr [ k ], i = h, n = ni, j; i < n; i++) {
-                int s1 = sa [ i ];
-                int e1 = ea [ i ];
+        for (int anIncr : incr) {
+            for (int h = anIncr, i = h, n = ni, j; i < n; i++) {
+                int s1 = sa[i];
+                int e1 = ea[i];
                 for (j = i; j >= h; j -= h) {
-                    int s2 = sa [ j - h ];
-                    int e2 = ea [ j - h ];
+                    int s2 = sa[j - h];
+                    int e2 = ea[j - h];
                     if (s2 > s1) {
-                        sa [ j ] = s2;
-                        ea [ j ] = e2;
+                        sa[j] = s2;
+                        ea[j] = e2;
                     } else if ((s2 == s1) && (e2 > e1)) {
-                        sa [ j ] = s2;
-                        ea [ j ] = e2;
+                        sa[j] = s2;
+                        ea[j] = e2;
                     } else {
                         break;
                     }
                 }
-                sa [ j ] = s1;
-                ea [ j ] = e1;
+                sa[j] = s1;
+                ea[j] = e1;
             }
         }
         int[] ia = new int [ ni * 2 ];

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/CharScript.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/CharScript.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/CharScript.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/CharScript.java
 Fri Sep 16 11:17:35 2016
@@ -22,7 +22,6 @@ package org.apache.fop.complexscripts.ut
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
@@ -712,8 +711,8 @@ public final class CharScript {
         }
         int[] sa = new int [ s.size() ];
         int ns = 0;
-        for (Iterator it = s.iterator(); it.hasNext();) {
-            sa [ ns++ ] = (Integer) it.next();
+        for (Object value : s) {
+            sa[ns++] = (Integer) value;
         }
         Arrays.sort(sa);
         return sa;
@@ -739,23 +738,23 @@ public final class CharScript {
         }
         int sMax = -1;
         int cMax = -1;
-        for (Iterator it = m.entrySet().iterator(); it.hasNext();) {
-            Map.Entry e = (Map.Entry) it.next();
+        for (Object o : m.entrySet()) {
+            Map.Entry e = (Map.Entry) o;
             Integer k = (Integer) e.getKey();
             int s = k;
             switch (s) {
-            case SCRIPT_UNDETERMINED:
-            case SCRIPT_UNCODED:
-                break;
-            default:
-                Integer v = (Integer) e.getValue();
-                assert v != null;
-                int c = v;
-                if (c > cMax) {
-                    cMax = c;
-                    sMax = s;
-                }
-                break;
+                case SCRIPT_UNDETERMINED:
+                case SCRIPT_UNCODED:
+                    break;
+                default:
+                    Integer v = (Integer) e.getValue();
+                    assert v != null;
+                    int c = v;
+                    if (c > cMax) {
+                        cMax = c;
+                        sMax = s;
+                    }
+                    break;
             }
         }
         if (sMax < 0) {

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/GlyphSequence.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/GlyphSequence.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/GlyphSequence.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/GlyphSequence.java
 Fri Sep 16 11:17:35 2016
@@ -459,18 +459,18 @@ public class GlyphSequence implements Cl
         if (na > 0) {
             List gl = new ArrayList(na);
             if (baa != null) {
-                for (int i = 0; i < baa.length; i++) {
-                    gl.add(baa[i]);
+                for (CharAssociation aBaa : baa) {
+                    gl.add(aBaa);
                 }
             }
             if (iaa != null) {
-                for (int i = 0; i < iaa.length; i++) {
-                    gl.add(iaa[i]);
+                for (CharAssociation anIaa : iaa) {
+                    gl.add(anIaa);
                 }
             }
             if (laa != null) {
-                for (int i = 0; i < laa.length; i++) {
-                    gl.add(laa[i]);
+                for (CharAssociation aLaa : laa) {
+                    gl.add(aLaa);
                 }
             }
             return gl;
@@ -489,8 +489,7 @@ public class GlyphSequence implements Cl
         assert sa != null;
         int tg = 0;
         int ta = 0;
-        for (int i = 0, n = sa.length; i < n; i++) {
-            GlyphSequence s = sa [ i ];
+        for (GlyphSequence s : sa) {
             IntBuffer ga = s.getGlyphs();
             assert ga != null;
             int ng = ga.limit();
@@ -503,8 +502,7 @@ public class GlyphSequence implements Cl
         }
         IntBuffer uga = IntBuffer.allocate(tg);
         ArrayList ual = new ArrayList(ta);
-        for (int i = 0, n = sa.length; i < n; i++) {
-            GlyphSequence s = sa [ i ];
+        for (GlyphSequence s : sa) {
             uga.put(s.getGlyphs());
             ual.addAll(s.getAssociations());
         }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/NumberConverter.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/NumberConverter.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/NumberConverter.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/complexscripts/util/NumberConverter.java
 Fri Sep 16 11:17:35 2016
@@ -160,15 +160,14 @@ public class NumberConverter {
         int tokenType = TOKEN_NONE;
         List<Integer> token = new ArrayList<Integer>();
         Integer[] ca = UTF32.toUTF32(format, 0, true);
-        for (int i = 0, n = ca.length; i < n; i++) {
-            int c = ca[i];
+        for (Integer c : ca) {
             int tokenTypeNew = isAlphaNumeric(c) ? TOKEN_ALPHANUMERIC : 
TOKEN_NONALPHANUMERIC;
             if (tokenTypeNew != tokenType) {
                 if (token.size() > 0) {
                     if (tokenType == TOKEN_ALPHANUMERIC) {
-                        tokens.add(token.toArray(new Integer [ token.size() 
]));
+                        tokens.add(token.toArray(new Integer[token.size()]));
                     } else {
-                        separators.add(token.toArray(new Integer [ 
token.size() ]));
+                        separators.add(token.toArray(new 
Integer[token.size()]));
                     }
                     token.clear();
                 }
@@ -429,8 +428,8 @@ public class NumberConverter {
         for (String[] el : equivalentLanguages) {
             assert el.length >= 2;
             if (el[0].equals(i3c)) {
-                for (int i = 0, n = el.length; i < n; i++) {
-                    if (el[i].equals(lc)) {
+                for (String anEl : el) {
+                    if (anEl.equals(lc)) {
                         return true;
                     }
                 }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/datatypes/URISpecification.java
 Fri Sep 16 11:17:35 2016
@@ -132,8 +132,8 @@ public final class URISpecification {
             } else {
                 try {
                     byte[] utf8 = Character.toString(ch).getBytes("UTF-8");
-                    for (int j = 0, cj = utf8.length; j < cj; j++) {
-                        appendEscape(sb, utf8[j]);
+                    for (byte anUtf8 : utf8) {
+                        appendEscape(sb, anUtf8);
                     }
                 } catch (UnsupportedEncodingException e) {
                     throw new Error("Incompatible JVM. UTF-8 not supported.");

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/CollapsingBorderResolver.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/CollapsingBorderResolver.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/CollapsingBorderResolver.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/CollapsingBorderResolver.java
 Fri Sep 16 11:17:35 2016
@@ -121,8 +121,8 @@ class CollapsingBorderResolver implement
         /** Integrates the border-after of the part. */
         void resolveBordersLastRowInPart(List/*<GridUnit>*/ row, boolean 
withNormal,
                 boolean withLeadingTrailing, boolean withRest) {
-            for (int i = 0; i < row.size(); i++) {
-                ((GridUnit) 
row.get(i)).integrateBorderSegment(CommonBorderPaddingBackground.AFTER,
+            for (Object aRow : row) {
+                ((GridUnit) 
aRow).integrateBorderSegment(CommonBorderPaddingBackground.AFTER,
                         tablePart, withNormal, withLeadingTrailing, withRest);
             }
         }
@@ -203,8 +203,8 @@ class CollapsingBorderResolver implement
             // Resolve before- and after-borders for the table-row
             if (container instanceof TableRow) {
                 TableRow tableRow = (TableRow) container;
-                for (Iterator iter = row.iterator(); iter.hasNext();) {
-                    GridUnit gu = (GridUnit) iter.next();
+                for (Object aRow : row) {
+                    GridUnit gu = (GridUnit) aRow;
                     boolean first = (gu.getRowSpanIndex() == 0);
                     boolean last = gu.isLastGridUnitRowSpan();
                     
gu.integrateBorderSegment(CommonBorderPaddingBackground.BEFORE, tableRow,
@@ -219,8 +219,8 @@ class CollapsingBorderResolver implement
             }
             if (firstInPart) {
                 // Integrate the border-before of the part
-                for (int i = 0; i < row.size(); i++) {
-                    ((GridUnit) row.get(i)).integrateBorderSegment(
+                for (Object aRow : row) {
+                    ((GridUnit) aRow).integrateBorderSegment(
                             CommonBorderPaddingBackground.BEFORE, tablePart, 
true, true, true);
                 }
                 firstInPart = false;
@@ -269,8 +269,8 @@ class CollapsingBorderResolver implement
                  * To represent those values we (ab)use the normal and the 
rest fields of
                  * ConditionalBorder. But strictly speaking this is not their 
purposes.
                  */
-                for (Iterator guIter = row.iterator(); guIter.hasNext();) {
-                    ConditionalBorder borderBefore = ((GridUnit) 
guIter.next()).borderBefore;
+                for (Object aRow : row) {
+                    ConditionalBorder borderBefore = ((GridUnit) 
aRow).borderBefore;
                     borderBefore.leadingTrailing = borderBefore.normal;
                     borderBefore.rest = borderBefore.normal;
                 }
@@ -291,8 +291,8 @@ class CollapsingBorderResolver implement
              * grid units from the body will always resolve against the same, 
normal
              * header border.
              */
-            for (Iterator guIter = previousRow.iterator(); guIter.hasNext();) {
-                ConditionalBorder borderAfter = ((GridUnit) 
guIter.next()).borderAfter;
+            for (Object aPreviousRow : previousRow) {
+                ConditionalBorder borderAfter = ((GridUnit) 
aPreviousRow).borderAfter;
                 borderAfter.leadingTrailing = borderAfter.normal;
                 borderAfter.rest = borderAfter.normal;
                 leadingBorders.add(borderAfter);
@@ -324,8 +324,8 @@ class CollapsingBorderResolver implement
             resolveBordersLastRowInPart(footerLastRow, true, true, true);
             trailingBorders = new ArrayList(table.getNumberOfColumns());
             // See same method in ResolverInHeader for an explanation of the 
hack
-            for (Iterator guIter = footerFirstRow.iterator(); 
guIter.hasNext();) {
-                ConditionalBorder borderBefore = ((GridUnit) 
guIter.next()).borderBefore;
+            for (Object aFooterFirstRow : footerFirstRow) {
+                ConditionalBorder borderBefore = ((GridUnit) 
aFooterFirstRow).borderBefore;
                 borderBefore.leadingTrailing = borderBefore.normal;
                 borderBefore.rest = borderBefore.normal;
                 trailingBorders.add(borderBefore);
@@ -337,8 +337,8 @@ class CollapsingBorderResolver implement
             // first row of table-footer
             resolveBordersBetweenRows(previousRow, footerFirstRow);
             // See endRow method in ResolverInHeader for an explanation of the 
hack
-            for (Iterator guIter = footerLastRow.iterator(); 
guIter.hasNext();) {
-                ConditionalBorder borderAfter = ((GridUnit) 
guIter.next()).borderAfter;
+            for (Object aFooterLastRow : footerLastRow) {
+                ConditionalBorder borderAfter = ((GridUnit) 
aFooterLastRow).borderAfter;
                 borderAfter.leadingTrailing = borderAfter.normal;
                 borderAfter.rest = borderAfter.normal;
             }
@@ -364,8 +364,8 @@ class CollapsingBorderResolver implement
             previousRow = row;
             if (firstInBody) {
                 firstInBody = false;
-                for (Iterator iter = row.iterator(); iter.hasNext();) {
-                    GridUnit gu = (GridUnit) iter.next();
+                for (Object aRow : row) {
+                    GridUnit gu = (GridUnit) aRow;
                     gu.borderBefore.leadingTrailing = gu.borderBefore.normal;
                 }
             }
@@ -378,8 +378,8 @@ class CollapsingBorderResolver implement
                 // Trailing and rest borders already resolved with 
integrateTrailingBorders
                 resolveBordersLastRowInTable(previousRow, true, false, false);
             }
-            for (Iterator iter = previousRow.iterator(); iter.hasNext();) {
-                GridUnit gu = (GridUnit) iter.next();
+            for (Object aPreviousRow : previousRow) {
+                GridUnit gu = (GridUnit) aPreviousRow;
                 gu.borderAfter.leadingTrailing = gu.borderAfter.normal;
             }
         }
@@ -422,8 +422,8 @@ class CollapsingBorderResolver implement
             if (leadingBorders == null || table.omitHeaderAtBreak()) {
                 // No header, leading borders determined by the table
                 leadingBorders = new ArrayList(table.getNumberOfColumns());
-                for (Iterator colIter = table.getColumns().iterator(); 
colIter.hasNext();) {
-                    ConditionalBorder border = ((TableColumn) 
colIter.next()).borderBefore;
+                for (Object o : table.getColumns()) {
+                    ConditionalBorder border = ((TableColumn) o).borderBefore;
                     leadingBorders.add(border);
                 }
             }
@@ -434,8 +434,8 @@ class CollapsingBorderResolver implement
                 if (trailingBorders == null || table.omitFooterAtBreak()) {
                     // No footer, trailing borders determined by the table
                     trailingBorders = new 
ArrayList(table.getNumberOfColumns());
-                    for (Iterator colIter = table.getColumns().iterator(); 
colIter.hasNext();) {
-                        ConditionalBorder border = ((TableColumn) 
colIter.next()).borderAfter;
+                    for (Object o : table.getColumns()) {
+                        ConditionalBorder border = ((TableColumn) 
o).borderAfter;
                         trailingBorders.add(border);
                     }
                 }
@@ -456,14 +456,14 @@ class CollapsingBorderResolver implement
         delegate = null;
         /* TODO Temporary hack for resolved borders in header */
         if (headerLastRow != null) {
-            for (Iterator iter = headerLastRow.iterator(); iter.hasNext();) {
-                GridUnit gu = (GridUnit) iter.next();
+            for (Object aHeaderLastRow : headerLastRow) {
+                GridUnit gu = (GridUnit) aHeaderLastRow;
                 gu.borderAfter.leadingTrailing = gu.borderAfter.normal;
             }
         }
         if (footerLastRow != null) {
-            for (Iterator iter = footerLastRow.iterator(); iter.hasNext();) {
-                GridUnit gu = (GridUnit) iter.next();
+            for (Object aFooterLastRow : footerLastRow) {
+                GridUnit gu = (GridUnit) aFooterLastRow;
                 gu.borderAfter.leadingTrailing = gu.borderAfter.normal;
             }
         }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/EffRow.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/EffRow.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/EffRow.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/EffRow.java
 Fri Sep 16 11:17:35 2016
@@ -19,7 +19,6 @@
 
 package org.apache.fop.fo.flow.table;
 
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.fop.fo.Constants;
@@ -57,8 +56,7 @@ public class EffRow {
         this.bodyType = bodyType;
         this.gridUnits = gridUnits;
         // TODO this is ugly, but we may eventually be able to do without that 
index
-        for (Iterator guIter = gridUnits.iterator(); guIter.hasNext();) {
-            Object gu = guIter.next();
+        for (Object gu : gridUnits) {
             if (gu instanceof PrimaryGridUnit) {
                 ((PrimaryGridUnit) gu).setRowIndex(index);
             }
@@ -175,8 +173,8 @@ public class EffRow {
         if (row != null) {
             keep = Keep.getKeep(row.getKeepWithPrevious());
         }
-        for (Iterator iter = gridUnits.iterator(); iter.hasNext();) {
-            GridUnit gu = (GridUnit) iter.next();
+        for (Object gridUnit : gridUnits) {
+            GridUnit gu = (GridUnit) gridUnit;
             if (gu.isPrimary()) {
                 keep = keep.compare(gu.getPrimary().getKeepWithPrevious());
             }
@@ -196,8 +194,8 @@ public class EffRow {
         if (row != null) {
             keep = Keep.getKeep(row.getKeepWithNext());
         }
-        for (Iterator iter = gridUnits.iterator(); iter.hasNext();) {
-            GridUnit gu = (GridUnit) iter.next();
+        for (Object gridUnit : gridUnits) {
+            GridUnit gu = (GridUnit) gridUnit;
             if (!gu.isEmpty() && gu.getColSpanIndex() == 0 && 
gu.isLastGridUnitRowSpan()) {
                 keep = keep.compare(gu.getPrimary().getKeepWithNext());
             }
@@ -233,8 +231,8 @@ public class EffRow {
      */
     public int getBreakBefore() {
         int breakBefore = Constants.EN_AUTO;
-        for (Iterator iter = gridUnits.iterator(); iter.hasNext();) {
-            GridUnit gu = (GridUnit) iter.next();
+        for (Object gridUnit : gridUnits) {
+            GridUnit gu = (GridUnit) gridUnit;
             if (gu.isPrimary()) {
                 breakBefore = BreakUtil.compareBreakClasses(breakBefore,
                         gu.getPrimary().getBreakBefore());
@@ -257,8 +255,8 @@ public class EffRow {
      */
     public int getBreakAfter() {
         int breakAfter = Constants.EN_AUTO;
-        for (Iterator iter = gridUnits.iterator(); iter.hasNext();) {
-            GridUnit gu = (GridUnit) iter.next();
+        for (Object gridUnit : gridUnits) {
+            GridUnit gu = (GridUnit) gridUnit;
             if (!gu.isEmpty() && gu.getColSpanIndex() == 0 && 
gu.isLastGridUnitRowSpan()) {
                 breakAfter = BreakUtil.compareBreakClasses(breakAfter,
                         gu.getPrimary().getBreakAfter());

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/FixedColRowGroupBuilder.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/FixedColRowGroupBuilder.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/FixedColRowGroupBuilder.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/FixedColRowGroupBuilder.java
 Fri Sep 16 11:17:35 2016
@@ -20,9 +20,7 @@
 package org.apache.fop.fo.flow.table;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
-import java.util.ListIterator;
 
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.ValidationException;
@@ -106,8 +104,8 @@ class FixedColRowGroupBuilder extends Ro
     }
 
     private static void setFlagForCols(int flag, List row) {
-        for (ListIterator iter = row.listIterator(); iter.hasNext();) {
-            ((GridUnit) iter.next()).setFlag(flag);
+        for (Object aRow : row) {
+            ((GridUnit) aRow).setFlag(flag);
         }
     }
 
@@ -132,8 +130,8 @@ class FixedColRowGroupBuilder extends Ro
             eventProducer.breakIgnoredDueToRowSpanning(this, 
currentTableRow.getName(), false,
                     currentTableRow.getLocator());
         }
-        for (Iterator iter = ((List) rows.get(currentRowIndex)).iterator(); 
iter.hasNext();) {
-            GridUnit gu = (GridUnit) iter.next();
+        for (Object o : ((List) rows.get(currentRowIndex))) {
+            GridUnit gu = (GridUnit) o;
             // The row hasn't been filled with empty grid units yet
             if (gu != null) {
                 gu.setRow(currentTableRow);

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/VariableColRowGroupBuilder.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/VariableColRowGroupBuilder.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/VariableColRowGroupBuilder.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/flow/table/VariableColRowGroupBuilder.java
 Fri Sep 16 11:17:35 2016
@@ -19,7 +19,6 @@
 
 package org.apache.fop.fo.flow.table;
 
-import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -112,8 +111,8 @@ class VariableColRowGroupBuilder extends
     /** {@inheritDoc} */
     void endTable() throws ValidationException {
         RowGroupBuilder delegate = new FixedColRowGroupBuilder(table);
-        for (Iterator eventIter = events.iterator(); eventIter.hasNext();) {
-            ((Event) eventIter.next()).play(delegate);
+        for (Object event : events) {
+            ((Event) event).play(delegate);
         }
         delegate.endTable();
     }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java
 Fri Sep 16 11:17:35 2016
@@ -64,8 +64,8 @@ public class DimensionPropertyMaker exte
         if (super.isCorrespondingForced(propertyList)) {
             return true;
         }
-        for (int i = 0; i < extraCorresponding.length; i++) {
-            int wmcorr = extraCorresponding[i][0]; 
//propertyList.getWritingMode()];
+        for (int[] anExtraCorresponding : extraCorresponding) {
+            int wmcorr = anExtraCorresponding[0]; 
//propertyList.getWritingMode()];
             if (propertyList.getExplicit(wmcorr) != null) {
                 return true;
             }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/CustomFontCollection.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/CustomFontCollection.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/CustomFontCollection.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/CustomFontCollection.java
 Fri Sep 16 11:17:35 2016
@@ -53,9 +53,7 @@ public class CustomFontCollection implem
 
         String internalName = null;
 
-        for (int i = 0; i < embedFontInfoList.size(); i++) {
-            EmbedFontInfo embedFontInfo = embedFontInfoList.get(i);
-
+        for (EmbedFontInfo embedFontInfo : embedFontInfoList) {
             internalName = "F" + num;
             num++;
 
@@ -63,8 +61,7 @@ public class CustomFontCollection implem
             fontInfo.addMetrics(internalName, font);
 
             List<FontTriplet> triplets = embedFontInfo.getFontTriplets();
-            for (int tripletIndex = 0; tripletIndex < triplets.size(); 
tripletIndex++) {
-                FontTriplet triplet = triplets.get(tripletIndex);
+            for (FontTriplet triplet : triplets) {
                 fontInfo.addFontProperties(internalName, triplet);
             }
         }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/DefaultFontConfigurator.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/DefaultFontConfigurator.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/DefaultFontConfigurator.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/DefaultFontConfigurator.java
 Fri Sep 16 11:17:35 2016
@@ -179,8 +179,7 @@ public class DefaultFontConfigurator imp
             URI embedFile = embedFontInfo.getEmbedURI();
             log.debug("Adding font " + (embedFile != null ? embedFile + ", " : 
"")
                     + "metrics URI " + embedFontInfo.getMetricsURI());
-            for (int j = 0; j < tripletList.size(); ++j) {
-                FontTriplet triplet = tripletList.get(j);
+            for (FontTriplet triplet : tripletList) {
                 log.debug("  Font triplet "
                         + triplet.getName() + ", "
                         + triplet.getStyle() + ", "

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontAdder.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontAdder.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontAdder.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontAdder.java
 Fri Sep 16 11:17:35 2016
@@ -64,8 +64,7 @@ public class FontAdder {
             if (embedFontInfos == null) {
                 continue;
             }
-            for (int i = 0, c = embedFontInfos.length; i < c; i++) {
-                EmbedFontInfo fontInfo = embedFontInfos[i];
+            for (EmbedFontInfo fontInfo : embedFontInfos) {
                 if (fontInfo != null) {
                     fontInfoList.add(fontInfo);
                 }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontCache.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontCache.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontCache.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontCache.java
 Fri Sep 16 11:17:35 2016
@@ -284,8 +284,7 @@ public final class FontCache implements
      * @return file font file
      */
     public static File getFileFromUrls(String[] urls) {
-        for (int i = 0; i < urls.length; i++) {
-            String urlStr = urls[i];
+        for (String urlStr : urls) {
             if (urlStr != null) {
                 File fontFile = null;
                 if (urlStr.startsWith("file:")) {

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontInfo.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontInfo.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontInfo.java 
(original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontInfo.java 
Fri Sep 16 11:17:35 2016
@@ -113,8 +113,8 @@ public class FontInfo {
      * @param weight font weight
      */
     public void addFontProperties(String name, String[] families, String 
style, int weight) {
-        for (int i = 0; i < families.length; i++) {
-            addFontProperties(name, families[i], style, weight);
+        for (String family : families) {
+            addFontProperties(name, family, style, weight);
         }
     }
 
@@ -382,8 +382,8 @@ public class FontInfo {
     private List<FontTriplet> fontLookup(String[] families, String style, int 
weight, boolean substitutable) {
         List<FontTriplet> matchingTriplets = new ArrayList<FontTriplet>();
         FontTriplet triplet = null;
-        for (int i = 0; i < families.length; i++) {
-            triplet = fontLookup(families[i], style, weight, substitutable);
+        for (String family : families) {
+            triplet = fontLookup(family, style, weight, substitutable);
             if (triplet != null) {
                 matchingTriplets.add(triplet);
             }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontManager.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontManager.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontManager.java
 Fri Sep 16 11:17:35 2016
@@ -159,8 +159,8 @@ public class FontManager {
     public void setup(FontInfo fontInfo, FontCollection[] fontCollections) {
         int startNum = 1;
 
-        for (int i = 0, c = fontCollections.length; i < c; i++) {
-            startNum = fontCollections[i].setup(startNum, fontInfo);
+        for (FontCollection fontCollection : fontCollections) {
+            startNum = fontCollection.setup(startNum, fontInfo);
         }
         // Make any defined substitutions in the font info
         getFontSubstitutions().adjustFontInfo(fontInfo);

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontManagerConfigurator.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontManagerConfigurator.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontManagerConfigurator.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontManagerConfigurator.java
 Fri Sep 16 11:17:35 2016
@@ -147,10 +147,10 @@ public class FontManagerConfigurator {
             Configuration cfg, boolean strict) throws FOPException {
         List<FontTriplet.Matcher> matcherList = new 
java.util.ArrayList<FontTriplet.Matcher>();
         Configuration[] matches = cfg.getChildren("match");
-        for (int i = 0; i < matches.length; i++) {
+        for (Configuration matche : matches) {
             try {
                 matcherList.add(new FontFamilyRegExFontTripletMatcher(
-                        matches[i].getAttribute("font-family")));
+                        matche.getAttribute("font-family")));
             } catch (ConfigurationException ce) {
                 LogUtil.handleException(log, ce, strict);
                 continue;
@@ -189,8 +189,8 @@ public class FontManagerConfigurator {
 
         /** {@inheritDoc} */
         public boolean matches(FontTriplet triplet) {
-            for (int i = 0, c = matchers.length; i < c; i++) {
-                if (matchers[i].matches(triplet)) {
+            for (FontTriplet.Matcher matcher : matchers) {
+                if (matcher.matches(triplet)) {
                     return true;
                 }
             }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontSelector.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontSelector.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontSelector.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontSelector.java
 Fri Sep 16 11:17:35 2016
@@ -40,8 +40,8 @@ public final class FontSelector {
             CommonFont commonFont, PercentBaseContext context) {
         FontInfo fi = fonode.getFOEventHandler().getFontInfo();
         FontTriplet[] fontkeys = commonFont.getFontState(fi);
-        for (int i = 0; i < fontkeys.length; i++) {
-            Font font = fi.getFontInstance(fontkeys[i], commonFont.fontSize
+        for (FontTriplet fontkey : fontkeys) {
+            Font font = fi.getFontInstance(fontkey, commonFont.fontSize
                     .getValue(context));
             if (font.hasChar(c)) {
                 return font;

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontSetup.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontSetup.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontSetup.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontSetup.java
 Fri Sep 16 11:17:35 2016
@@ -208,8 +208,7 @@ public final class FontSetup {
             fontInfo.addMetrics(internalName, font);
 
             List<FontTriplet> triplets = embedFontInfo.getFontTriplets();
-            for (int tripletIndex = 0; tripletIndex < triplets.size(); 
tripletIndex++) {
-                FontTriplet triplet = triplets.get(tripletIndex);
+            for (FontTriplet triplet : triplets) {
                 fontInfo.addFontProperties(internalName, triplet);
             }
         }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontUtil.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontUtil.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontUtil.java 
(original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/FontUtil.java 
Fri Sep 16 11:17:35 2016
@@ -104,8 +104,8 @@ public final class FontUtil {
      */
     public static String guessStyle(String fontName) {
         if (fontName != null) {
-            for (int i = 0; i < ITALIC_WORDS.length; i++) {
-                if (fontName.indexOf(ITALIC_WORDS[i]) != -1) {
+            for (String word : ITALIC_WORDS) {
+                if (fontName.indexOf(word) != -1) {
                     return Font.STYLE_ITALIC;
                 }
             }
@@ -122,34 +122,34 @@ public final class FontUtil {
         // weight
         int weight = Font.WEIGHT_NORMAL;
 
-        for (int i = 0; i < BOLD_WORDS.length; i++) {
-            if (fontName.indexOf(BOLD_WORDS[i]) != -1) {
+        for (String word : BOLD_WORDS) {
+            if (fontName.indexOf(word) != -1) {
                 weight = Font.WEIGHT_BOLD;
                 break;
             }
         }
-        for (int i = 0; i < MEDIUM_WORDS.length; i++) {
-            if (fontName.indexOf(MEDIUM_WORDS[i]) != -1) {
+        for (String word : MEDIUM_WORDS) {
+            if (fontName.indexOf(word) != -1) {
                 weight = Font.WEIGHT_NORMAL + 100; //500
                 break;
             }
         }
         //Search for "semi/demi" before "light", but after "bold"
         //(normally semi/demi-bold is meant, but it can also be 
semi/demi-light)
-        for (int i = 0; i < DEMI_WORDS.length; i++) {
-            if (fontName.indexOf(DEMI_WORDS[i]) != -1) {
+        for (String word : DEMI_WORDS) {
+            if (fontName.indexOf(word) != -1) {
                 weight = Font.WEIGHT_BOLD - 100; //600
                 break;
             }
         }
-        for (int i = 0; i < EXTRA_BOLD_WORDS.length; i++) {
-            if (fontName.indexOf(EXTRA_BOLD_WORDS[i]) != -1) {
+        for (String word : EXTRA_BOLD_WORDS) {
+            if (fontName.indexOf(word) != -1) {
                 weight = Font.WEIGHT_EXTRA_BOLD;
                 break;
             }
         }
-        for (int i = 0; i < LIGHT_WORDS.length; i++) {
-            if (fontName.indexOf(LIGHT_WORDS[i]) != -1) {
+        for (String word : LIGHT_WORDS) {
+            if (fontName.indexOf(word) != -1) {
                 weight = Font.WEIGHT_LIGHT;
                 break;
             }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/MultiByteFont.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/MultiByteFont.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/MultiByteFont.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/MultiByteFont.java
 Fri Sep 16 11:17:35 2016
@@ -588,10 +588,9 @@ public class MultiByteFont extends CIDFo
 
     private int[][] scaleAdjustments(int[][] adjustments, int fontSize) {
         if (adjustments != null) {
-            for (int i = 0, n = adjustments.length; i < n; i++) {
-                int[] gpa = adjustments [ i ];
+            for (int[] gpa : adjustments) {
                 for (int k = 0; k < 4; k++) {
-                    gpa [ k ] = (gpa [ k ] * fontSize) / 1000;
+                    gpa[k] = (gpa[k] * fontSize) / 1000;
                 }
             }
             return adjustments;
@@ -710,9 +709,9 @@ public class MultiByteFont extends CIDFo
         for (int i = 0, n = cs.length(); i < n; i++) {
             int cc = cs.charAt(i);
             int[] da = CharNormalize.decompose(cc, daBuffer);
-            for (int j = 0; j < da.length; j++) {
-                if (da[j] > 0) {
-                    sb.append((char) da[j]);
+            for (int aDa : da) {
+                if (aDa > 0) {
+                    sb.append((char) aDa);
                 } else {
                     break;
                 }
@@ -752,8 +751,7 @@ public class MultiByteFont extends CIDFo
 
     private static boolean hasElidableControl(GlyphSequence gs) {
         int[] ca = gs.getCharacterArray(false);
-        for (int i = 0, n = ca.length; i < n; ++i) {
-            int ch = ca [ i ];
+        for (int ch : ca) {
             if (isElidableControl(ch)) {
                 return true;
             }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/SingleByteFont.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/SingleByteFont.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/SingleByteFont.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/SingleByteFont.java
 Fri Sep 16 11:17:35 2016
@@ -172,12 +172,12 @@ public class SingleByteFont extends Cust
         String charName = Glyphs.charToGlyphName(c);
         String[] charNameAlternatives = 
Glyphs.getCharNameAlternativesFor(charName);
         if (charNameAlternatives != null && charNameAlternatives.length > 0) {
-            for (int i = 0; i < charNameAlternatives.length; i++) {
+            for (String charNameAlternative : charNameAlternatives) {
                 if (log.isDebugEnabled()) {
                     log.debug("Checking alternative for char " + c + " 
(charname="
-                            + charName + "): " + charNameAlternatives[i]);
+                            + charName + "): " + charNameAlternative);
                 }
-                String s = 
Glyphs.getUnicodeSequenceForGlyphName(charNameAlternatives[i]);
+                String s = 
Glyphs.getUnicodeSequenceForGlyphName(charNameAlternative);
                 if (s != null) {
                     d = lookupChar(s.charAt(0));
                     if (d != SingleByteEncoding.NOT_FOUND_CODE_POINT) {

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/XMLFontMetricsReader.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/XMLFontMetricsReader.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/XMLFontMetricsReader.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/XMLFontMetricsReader.java
 Fri Sep 16 11:17:35 2016
@@ -290,8 +290,8 @@ public class XMLFontMetricsReader extend
         } else if ("cid-widths".equals(localName)) {
             int[] wds = new int[cidWidths.size()];
             int j = 0;
-            for (int count = 0; count < cidWidths.size(); count++) {
-                wds[j++] = cidWidths.get(count);
+            for (Integer cidWidth : cidWidths) {
+                wds[j++] = cidWidth;
             }
 
             //multiFont.addCIDWidthEntry(cidWidthIndex, wds);

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/autodetect/NativeFontDirFinder.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/autodetect/NativeFontDirFinder.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/autodetect/NativeFontDirFinder.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/autodetect/NativeFontDirFinder.java
 Fri Sep 16 11:17:35 2016
@@ -36,8 +36,8 @@ public abstract class NativeFontDirFinde
         List<File> fontDirList = new java.util.ArrayList<File>();
         String[] searchableDirectories = getSearchableDirectories();
         if (searchableDirectories != null) {
-            for (int i = 0; i < searchableDirectories.length; i++) {
-                File fontDir = new File(searchableDirectories[i]);
+            for (String searchableDirectory : searchableDirectories) {
+                File fontDir = new File(searchableDirectory);
                 if (fontDir.exists() && fontDir.canRead()) {
                     fontDirList.add(fontDir);
                 }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/substitute/FontQualifier.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/substitute/FontQualifier.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/substitute/FontQualifier.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/substitute/FontQualifier.java
 Fri Sep 16 11:17:35 2016
@@ -19,7 +19,6 @@
 
 package org.apache.fop.fonts.substitute;
 
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -86,10 +85,9 @@ public class FontQualifier {
     public void setFontWeight(String fontWeight) {
         AttributeValue fontWeightAttribute = 
AttributeValue.valueOf(fontWeight);
         if (fontWeightAttribute != null) {
-            for (Iterator it = fontWeightAttribute.iterator(); it.hasNext();) {
-                Object weightObj = it.next();
+            for (Object weightObj : fontWeightAttribute) {
                 if (weightObj instanceof String) {
-                    String weightString = ((String)weightObj).trim();
+                    String weightString = ((String) weightObj).trim();
                     try {
                         FontUtil.parseCSS2FontWeight(weightString);
                     } catch (IllegalArgumentException ex) {
@@ -157,14 +155,13 @@ public class FontQualifier {
         List/*<FontTriplet>*/ matchingTriplets = new 
java.util.ArrayList/*<FontTriplet>*/();
 
         // try to find matching destination font triplet
-        for (Iterator attrIt = fontFamilyValue.iterator(); attrIt.hasNext();) {
-            String fontFamilyString = (String)attrIt.next();
-            Map/*<FontTriplet>*/ triplets = 
(Map/*<FontTriplet>*/)fontInfo.getFontTriplets();
+        for (Object aFontFamilyValue : fontFamilyValue) {
+            String fontFamilyString = (String) aFontFamilyValue;
+            Map/*<FontTriplet>*/ triplets = (Map/*<FontTriplet>*/) 
fontInfo.getFontTriplets();
             if (triplets != null) {
                 Set/*<FontTriplet>*/ tripletSet = triplets.keySet();
-                for (Iterator/*<FontTriplet>*/ tripletIt = 
tripletSet.iterator();
-                        tripletIt.hasNext();) {
-                    FontTriplet triplet = (FontTriplet)tripletIt.next();
+                for (Object aTripletSet : tripletSet) {
+                    FontTriplet triplet = (FontTriplet) aTripletSet;
                     String fontName = triplet.getName();
 
                     // matched font family name
@@ -173,22 +170,21 @@ public class FontQualifier {
                         // try and match font weight
                         boolean weightMatched = false;
                         int fontWeight = triplet.getWeight();
-                        for (Iterator weightIt = weightValue.iterator(); 
weightIt.hasNext();) {
-                            Object weightObj = weightIt.next();
+                        for (Object weightObj : weightValue) {
                             if (weightObj instanceof FontWeightRange) {
-                                FontWeightRange intRange = 
(FontWeightRange)weightObj;
+                                FontWeightRange intRange = (FontWeightRange) 
weightObj;
                                 if (intRange.isWithinRange(fontWeight)) {
                                     weightMatched = true;
                                 }
                             } else if (weightObj instanceof String) {
-                                String fontWeightString = (String)weightObj;
+                                String fontWeightString = (String) weightObj;
                                 int fontWeightValue = 
FontUtil.parseCSS2FontWeight(
                                         fontWeightString);
                                 if (fontWeightValue == fontWeight) {
                                     weightMatched = true;
                                 }
                             } else if (weightObj instanceof Integer) {
-                                Integer fontWeightInteger = (Integer)weightObj;
+                                Integer fontWeightInteger = (Integer) 
weightObj;
                                 int fontWeightValue = fontWeightInteger;
                                 if (fontWeightValue == fontWeight) {
                                     weightMatched = true;
@@ -199,8 +195,8 @@ public class FontQualifier {
                         // try and match font style
                         boolean styleMatched = false;
                         String fontStyleString = triplet.getStyle();
-                        for (Iterator styleIt = styleValue.iterator(); 
styleIt.hasNext();) {
-                            String style = (String)styleIt.next();
+                        for (Object aStyleValue : styleValue) {
+                            String style = (String) aStyleValue;
                             if (fontStyleString.equals(style)) {
                                 styleMatched = true;
                             }
@@ -227,8 +223,8 @@ public class FontQualifier {
         if (matchingTriplets.size() == 1) {
             bestTriplet = (FontTriplet)matchingTriplets.get(0);
         } else {
-            for (Iterator iterator = matchingTriplets.iterator(); 
iterator.hasNext();) {
-                FontTriplet triplet = (FontTriplet)iterator.next();
+            for (Object matchingTriplet : matchingTriplets) {
+                FontTriplet triplet = (FontTriplet) matchingTriplet;
                 if (bestTriplet == null) {
                     bestTriplet = triplet;
                 } else {
@@ -249,29 +245,27 @@ public class FontQualifier {
         List/*<FontTriplet>*/ triplets = new 
java.util.ArrayList/*<FontTriplet>*/();
 
         AttributeValue fontFamilyValue = getFontFamily();
-        for (Iterator fontFamilyIt = fontFamilyValue.iterator(); 
fontFamilyIt.hasNext();) {
-            String name = (String)fontFamilyIt.next();
+        for (Object aFontFamilyValue : fontFamilyValue) {
+            String name = (String) aFontFamilyValue;
 
             AttributeValue styleValue = getFontStyle();
-            for (Iterator styleIt = styleValue.iterator(); styleIt.hasNext();) 
{
-                String style = (String)styleIt.next();
+            for (Object aStyleValue : styleValue) {
+                String style = (String) aStyleValue;
 
                 AttributeValue weightValue = getFontWeight();
-                for (Iterator weightIt = weightValue.iterator(); 
weightIt.hasNext();) {
-                    Object weightObj = weightIt.next();
-
+                for (Object weightObj : weightValue) {
                     if (weightObj instanceof FontWeightRange) {
-                        FontWeightRange fontWeightRange = 
(FontWeightRange)weightObj;
+                        FontWeightRange fontWeightRange = (FontWeightRange) 
weightObj;
                         int[] weightRange = fontWeightRange.toArray();
-                        for (int i = 0; i < weightRange.length; i++) {
-                            triplets.add(new FontTriplet(name, style, 
weightRange[i]));
+                        for (int aWeightRange : weightRange) {
+                            triplets.add(new FontTriplet(name, style, 
aWeightRange));
                         }
                     } else if (weightObj instanceof String) {
-                        String weightString = (String)weightObj;
+                        String weightString = (String) weightObj;
                         int weight = 
FontUtil.parseCSS2FontWeight(weightString);
                         triplets.add(new FontTriplet(name, style, weight));
                     } else if (weightObj instanceof Integer) {
-                        Integer weightInteger = (Integer)weightObj;
+                        Integer weightInteger = (Integer) weightObj;
                         int weight = weightInteger;
                         triplets.add(new FontTriplet(name, style, weight));
                     }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/substitute/FontSubstitutions.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/substitute/FontSubstitutions.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/substitute/FontSubstitutions.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/substitute/FontSubstitutions.java
 Fri Sep 16 11:17:35 2016
@@ -58,8 +58,8 @@ public class FontSubstitutions extends j
 
             FontQualifier fromQualifier = substitution.getFromQualifier();
             List/*<FontTriplet>*/ tripletList = fromQualifier.getTriplets();
-            for (Iterator tripletit = tripletList.iterator(); 
tripletit.hasNext();) {
-                FontTriplet triplet = (FontTriplet) tripletit.next();
+            for (Object aTripletList : tripletList) {
+                FontTriplet triplet = (FontTriplet) aTripletList;
                 fontInfo.addFontProperties(internalFontKey, triplet);
             }
         }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/substitute/FontSubstitutionsConfigurator.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/substitute/FontSubstitutionsConfigurator.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/substitute/FontSubstitutionsConfigurator.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/substitute/FontSubstitutionsConfigurator.java
 Fri Sep 16 11:17:35 2016
@@ -66,12 +66,12 @@ public class FontSubstitutionsConfigurat
      */
     public void configure(FontSubstitutions substitutions) throws FOPException 
{
         Configuration[] substitutionCfgs = cfg.getChildren("substitution");
-        for (int i = 0; i < substitutionCfgs.length; i++) {
-            Configuration fromCfg = substitutionCfgs[i].getChild("from", 
false);
+        for (Configuration substitutionCfg : substitutionCfgs) {
+            Configuration fromCfg = substitutionCfg.getChild("from", false);
             if (fromCfg == null) {
                 throw new FOPException("'substitution' element without child 
'from' element");
             }
-            Configuration toCfg = substitutionCfgs[i].getChild("to", false);
+            Configuration toCfg = substitutionCfg.getChild("to", false);
             if (fromCfg == null) {
                 throw new FOPException("'substitution' element without child 
'to' element");
             }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/truetype/OpenFont.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/truetype/OpenFont.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/truetype/OpenFont.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/truetype/OpenFont.java
 Fri Sep 16 11:17:35 2016
@@ -1504,30 +1504,30 @@ public abstract class OpenFont {
         int localXHeight = 0;
         int localAscender = 0;
         int localDescender = 0;
-        for (int i = 0; i < mtxTab.length; i++) {
-            if ("H".equals(mtxTab[i].getName())) {
-                localCapHeight = mtxTab[i].getBoundingBox()[3];
-            } else if ("x".equals(mtxTab[i].getName())) {
-                localXHeight = mtxTab[i].getBoundingBox()[3];
-            } else if ("d".equals(mtxTab[i].getName())) {
-                localAscender = mtxTab[i].getBoundingBox()[3];
-            } else if ("p".equals(mtxTab[i].getName())) {
-                localDescender = mtxTab[i].getBoundingBox()[1];
+        for (OFMtxEntry aMtxTab : mtxTab) {
+            if ("H".equals(aMtxTab.getName())) {
+                localCapHeight = aMtxTab.getBoundingBox()[3];
+            } else if ("x".equals(aMtxTab.getName())) {
+                localXHeight = aMtxTab.getBoundingBox()[3];
+            } else if ("d".equals(aMtxTab.getName())) {
+                localAscender = aMtxTab.getBoundingBox()[3];
+            } else if ("p".equals(aMtxTab.getName())) {
+                localDescender = aMtxTab.getBoundingBox()[1];
             } else {
                 // OpenType Fonts with a version 3.0 "post" table don't have 
glyph names.
                 // Use Unicode indices instead.
-                List unicodeIndex = mtxTab[i].getUnicodeIndex();
+                List unicodeIndex = aMtxTab.getUnicodeIndex();
                 if (unicodeIndex.size() > 0) {
                     //Only the first index is used
-                    char ch = (char)((Integer)unicodeIndex.get(0)).intValue();
+                    char ch = (char) ((Integer) 
unicodeIndex.get(0)).intValue();
                     if (ch == 'H') {
-                        localCapHeight = mtxTab[i].getBoundingBox()[3];
+                        localCapHeight = aMtxTab.getBoundingBox()[3];
                     } else if (ch == 'x') {
-                        localXHeight = mtxTab[i].getBoundingBox()[3];
+                        localXHeight = aMtxTab.getBoundingBox()[3];
                     } else if (ch == 'd') {
-                        localAscender = mtxTab[i].getBoundingBox()[3];
+                        localAscender = aMtxTab.getBoundingBox()[3];
                     } else if (ch == 'p') {
-                        localDescender = mtxTab[i].getBoundingBox()[1];
+                        localDescender = aMtxTab.getBoundingBox()[1];
                     }
                 }
             }
@@ -1640,8 +1640,8 @@ public abstract class OpenFont {
                     while (uniMap.hasNext()) {
                         Integer unicodeKey = (Integer)uniMap.next();
                         Integer[] ansiKeys = unicodeToWinAnsi(unicodeKey);
-                        for (int u = 0; u < ansiKeys.length; u++) {
-                            akpx.put(ansiKeys[u], kern);
+                        for (Integer ansiKey : ansiKeys) {
+                            akpx.put(ansiKey, kern);
                         }
                     }
                 }
@@ -1651,8 +1651,8 @@ public abstract class OpenFont {
                     while (uniMap.hasNext()) {
                         Integer unicodeKey = (Integer)uniMap.next();
                         Integer[] ansiKeys = unicodeToWinAnsi(unicodeKey);
-                        for (int u = 0; u < ansiKeys.length; u++) {
-                            ansiKerningTab.put(ansiKeys[u], akpx);
+                        for (Integer ansiKey : ansiKeys) {
+                            ansiKerningTab.put(ansiKey, akpx);
                         }
                     }
                 }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/hyphenation/HyphenationTree.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/hyphenation/HyphenationTree.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/hyphenation/HyphenationTree.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/hyphenation/HyphenationTree.java
 Fri Sep 16 11:17:35 2016
@@ -264,9 +264,9 @@ public class HyphenationTree extends Ter
                 if (hstrcmp(word, i, kv.getArray(), lo[p]) == 0) {
                     values = getValues(eq[p]);    // data pointer is in eq[]
                     int j = index;
-                    for (int k = 0; k < values.length; k++) {
-                        if (j < il.length && values[k] > il[j]) {
-                            il[j] = values[k];
+                    for (byte value : values) {
+                        if (j < il.length && value > il[j]) {
+                            il[j] = value;
                         }
                         j++;
                     }
@@ -291,9 +291,9 @@ public class HyphenationTree extends Ter
                     if (sc[q] == 0) {
                         values = getValues(eq[q]);
                         int j = index;
-                        for (int k = 0; k < values.length; k++) {
-                            if (j < il.length && values[k] > il[j]) {
-                                il[j] = values[k];
+                        for (byte value : values) {
+                            if (j < il.length && value > il[j]) {
+                                il[j] = value;
                             }
                             j++;
                         }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/hyphenation/PatternParser.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/hyphenation/PatternParser.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/hyphenation/PatternParser.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/hyphenation/PatternParser.java
 Fri Sep 16 11:17:35 2016
@@ -195,10 +195,9 @@ public class PatternParser extends Defau
 
     private ArrayList normalizeException(ArrayList ex) {
         ArrayList res = new ArrayList();
-        for (int i = 0; i < ex.size(); i++) {
-            Object item = ex.get(i);
+        for (Object item : ex) {
             if (item instanceof String) {
-                String str = (String)item;
+                String str = (String) item;
                 StringBuffer buf = new StringBuffer();
                 for (int j = 0; j < str.length(); j++) {
                     char c = str.charAt(j);
@@ -226,13 +225,12 @@ public class PatternParser extends Defau
 
     private String getExceptionWord(ArrayList ex) {
         StringBuffer res = new StringBuffer();
-        for (int i = 0; i < ex.size(); i++) {
-            Object item = ex.get(i);
+        for (Object item : ex) {
             if (item instanceof String) {
-                res.append((String)item);
+                res.append((String) item);
             } else {
-                if (((Hyphen)item).noBreak != null) {
-                    res.append(((Hyphen)item).noBreak);
+                if (((Hyphen) item).noBreak != null) {
+                    res.append(((Hyphen) item).noBreak);
                 }
             }
         }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/SpaceResolver.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/SpaceResolver.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/SpaceResolver.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/SpaceResolver.java
 Fri Sep 16 11:17:35 2016
@@ -409,9 +409,9 @@ public final class SpaceResolver {
 
     private MinOptMax sum(MinOptMax[] lengths) {
         MinOptMax sum = MinOptMax.ZERO;
-        for (int i = 0; i < lengths.length; i++) {
-            if (lengths[i] != null) {
-                sum = sum.plus(lengths[i]);
+        for (MinOptMax length : lengths) {
+            if (length != null) {
+                sum = sum.plus(length);
             }
         }
         return sum;

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
 Fri Sep 16 11:17:35 2016
@@ -20,7 +20,6 @@
 package org.apache.fop.layoutmgr.inline;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;
@@ -270,8 +269,8 @@ public class ContentLayoutManager extend
                     Object obj = returnedList.remove(0);
                     if (obj instanceof KnuthSequence) {
                         KnuthSequence ks = (KnuthSequence)obj;
-                        for (Iterator it = ks.iterator(); it.hasNext();) {
-                            contentElement = (KnuthElement)it.next();
+                        for (Object k : ks) {
+                            contentElement = (KnuthElement) k;
                             stackSize += contentElement.getWidth();
                             contentList.add(contentElement);
                         }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
 Fri Sep 16 11:17:35 2016
@@ -295,8 +295,8 @@ public class LineLayoutManager extends I
          * @return true if the sequence contains a box
          */
         public boolean containsBox() {
-            for (int i = 0; i < this.size(); i++) {
-                KnuthElement el = (KnuthElement)this.get(i);
+            for (Object o : this) {
+                KnuthElement el = (KnuthElement) o;
                 if (el.isBox()) {
                     return true;
                 }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/ColumnSetup.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/ColumnSetup.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/ColumnSetup.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/ColumnSetup.java
 Fri Sep 16 11:17:35 2016
@@ -211,8 +211,8 @@ public class ColumnSetup {
          * and work out the total number of factors to use to distribute
          * the remaining space (if any)
          */
-        for (Iterator i = colWidths.iterator(); i.hasNext();) {
-            Length colWidth = (Length) i.next();
+        for (Object colWidth1 : colWidths) {
+            Length colWidth = (Length) colWidth1;
             if (colWidth != null) {
                 sumCols += colWidth.getValue(percentBaseContext);
                 if (colWidth instanceof RelativeNumericProperty) {

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/RowGroupLayoutManager.java
 Fri Sep 16 11:17:35 2016
@@ -95,10 +95,10 @@ class RowGroupLayoutManager {
             int bodyType, LinkedList returnList) {
         log.debug("Handling row group with " + rowGroup.length + " rows...");
         EffRow row;
-        for (int rgi = 0; rgi < rowGroup.length; rgi++) {
-            row = rowGroup[rgi];
-            for (Iterator iter = row.getGridUnits().iterator(); 
iter.hasNext();) {
-                GridUnit gu = (GridUnit) iter.next();
+        for (EffRow aRowGroup : rowGroup) {
+            row = aRowGroup;
+            for (Object o : row.getGridUnits()) {
+                GridUnit gu = (GridUnit) o;
                 if (gu.isPrimary()) {
                     PrimaryGridUnit primary = gu.getPrimary();
                     // TODO a new LM must be created for every new 
static-content
@@ -118,7 +118,7 @@ class RowGroupLayoutManager {
 
                     //Get the element list for the cell contents
                     List elems = primary.getCellLM().getNextKnuthElements(
-                                            childLC, alignment);
+                            childLC, alignment);
                     ElementListObserver.observe(elems, "table-cell", 
primary.getCell().getId());
                     primary.setElements(elems);
                 }
@@ -155,8 +155,8 @@ class RowGroupLayoutManager {
                 rowHeights[rgi] = rowBPD.toMinOptMax(tableLM);
                 explicitRowHeight = rowBPD.toMinOptMax(tableLM);
             }
-            for (Iterator iter = row.getGridUnits().iterator(); 
iter.hasNext();) {
-                GridUnit gu = (GridUnit) iter.next();
+            for (Object o : row.getGridUnits()) {
+                GridUnit gu = (GridUnit) o;
                 if (!gu.isEmpty() && gu.getColSpanIndex() == 0 && 
gu.isLastGridUnitRowSpan()) {
                     PrimaryGridUnit primary = gu.getPrimary();
                     int effectiveCellBPD = 0;

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/RowPainter.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/RowPainter.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/RowPainter.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/RowPainter.java
 Fri Sep 16 11:17:35 2016
@@ -126,8 +126,8 @@ class RowPainter {
 
         if (tablePartBackground != null) {
             TableLayoutManager tableLM = tclm.getTableLM();
-            for (Iterator iter = tablePartBackgroundAreas.iterator(); 
iter.hasNext();) {
-                Block backgroundArea = (Block) iter.next();
+            for (Object tablePartBackgroundArea : tablePartBackgroundAreas) {
+                Block backgroundArea = (Block) tablePartBackgroundArea;
                 TraitSetter.addBackground(backgroundArea, tablePartBackground, 
tableLM,
                         -backgroundArea.getXOffset(), tablePartOffset - 
backgroundArea.getYOffset(),
                         tableLM.getContentAreaIPD(), currentRowOffset - 
tablePartOffset);

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
 Fri Sep 16 11:17:35 2016
@@ -291,8 +291,7 @@ public class TableCellLayoutManager exte
             return;
         }
         int n = childrenLMs.size();
-        for (int j = 0; j < n; j++) {
-            LayoutManager lm = childrenLMs.get(j);
+        for (LayoutManager lm : childrenLMs) {
             if (lm == null) {
                 return;
             } else if (lm instanceof RetrieveTableMarkerLayoutManager) {

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
 Fri Sep 16 11:17:35 2016
@@ -564,8 +564,8 @@ public class TableContentLayoutManager i
             getTableLM().registerMarkers(body.getMarkers(), true, isFirstPos, 
isLastPos);
         }
         painter.startTablePart(body);
-        for (Iterator iter = positions.iterator(); iter.hasNext();) {
-            painter.handleTableContentPosition((TableContentPosition) 
iter.next());
+        for (Object position : positions) {
+            painter.handleTableContentPosition((TableContentPosition) 
position);
         }
         getTableLM().getCurrentPV().registerMarkers(body.getMarkers(),
                 false, isFirstPos, isLastPos);

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
 Fri Sep 16 11:17:35 2016
@@ -386,8 +386,8 @@ public class TableLayoutManager extends
         curBlockArea.setBPD(tableHeight);
 
         if (columnBackgroundAreas != null) {
-            for (Iterator iter = columnBackgroundAreas.iterator(); 
iter.hasNext();) {
-                ColumnBackgroundInfo b = (ColumnBackgroundInfo) iter.next();
+            for (Object columnBackgroundArea : columnBackgroundAreas) {
+                ColumnBackgroundInfo b = (ColumnBackgroundInfo) 
columnBackgroundArea;
                 TraitSetter.addBackground(b.backgroundArea,
                         b.column.getCommonBorderPaddingBackground(), this,
                         b.xShift, -b.backgroundArea.getYOffset(),
@@ -558,8 +558,7 @@ public class TableLayoutManager extends
         // if we get to this stage then we are at the footer of the table 
fragment; this means that no more
         // different TCLM need to be saved (we already have all); we flag the 
list as being complete then
         areAllTCLMsSaved = true;
-        for (int i = 0; i < savedTCLMs.size(); i++) {
-            TableCellLayoutManager tclm = savedTCLMs.get(i);
+        for (TableCellLayoutManager tclm : savedTCLMs) {
             if (this.repeatedHeader) {
                 tclm.setHasRepeatedHeader(true);
             }

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableRowIterator.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableRowIterator.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableRowIterator.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableRowIterator.java
 Fri Sep 16 11:17:35 2016
@@ -92,8 +92,8 @@ public class TableRowIterator {
         List rowGroup = (List) rowGroupsIter.next();
         EffRow[] effRowGroup = new EffRow[rowGroup.size()];
         int i = 0;
-        for (Iterator rowIter = rowGroup.iterator(); rowIter.hasNext();) {
-            List gridUnits = (List) rowIter.next();
+        for (Object aRowGroup : rowGroup) {
+            List gridUnits = (List) aRowGroup;
             effRowGroup[i++] = new EffRow(rowIndex++, tablePart, gridUnits);
         }
         return effRowGroup;

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableStepper.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableStepper.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableStepper.java
 (original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableStepper.java
 Fri Sep 16 11:17:35 2016
@@ -121,8 +121,8 @@ public class TableStepper {
 
     private void calcTotalHeight() {
         totalHeight = 0;
-        for (int i = 0; i < rowGroup.length; i++) {
-            totalHeight += rowGroup[i].getHeight().getOpt();
+        for (EffRow aRowGroup : rowGroup) {
+            totalHeight += aRowGroup.getHeight().getOpt();
         }
         if (log.isDebugEnabled()) {
             log.debug("totalHeight=" + totalHeight);
@@ -131,8 +131,8 @@ public class TableStepper {
 
     private int getMaxRemainingHeight() {
         int maxW = 0;
-        for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
-            ActiveCell activeCell = (ActiveCell) iter.next();
+        for (Object activeCell1 : activeCells) {
+            ActiveCell activeCell = (ActiveCell) activeCell1;
             int remain = activeCell.getRemainingLength();
             PrimaryGridUnit pgu = activeCell.getPrimaryGridUnit();
             for (int i = activeRowIndex + 1; i < pgu.getRowIndex() - 
rowGroup[0].getIndex()
@@ -202,8 +202,8 @@ public class TableStepper {
             LinkedList footnoteList = new LinkedList();
             //Put all involved grid units into a list
             List cellParts = new java.util.ArrayList(activeCells.size());
-            for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
-                ActiveCell activeCell = (ActiveCell) iter.next();
+            for (Object activeCell2 : activeCells) {
+                ActiveCell activeCell = (ActiveCell) activeCell2;
                 CellPart part = activeCell.createCellPart();
                 cellParts.add(part);
                 activeCell.addFootnotes(footnoteList);
@@ -242,8 +242,8 @@ public class TableStepper {
 
             Keep keep = getTableLM().getKeepTogether();
             int stepPenalty = 0;
-            for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
-                ActiveCell activeCell = (ActiveCell) iter.next();
+            for (Object activeCell1 : activeCells) {
+                ActiveCell activeCell = (ActiveCell) activeCell1;
                 keep = keep.compare(activeCell.getKeepWithNext());
                 stepPenalty = Math.max(stepPenalty, 
activeCell.getPenaltyValue());
             }
@@ -342,8 +342,8 @@ public class TableStepper {
      * previous rows and spanning over this one)
      */
     private void computeRowFirstStep(List cells) {
-        for (Iterator iter = cells.iterator(); iter.hasNext();) {
-            ActiveCell activeCell = (ActiveCell) iter.next();
+        for (Object cell : cells) {
+            ActiveCell activeCell = (ActiveCell) cell;
             rowFirstStep = Math.max(rowFirstStep, activeCell.getFirstStep());
         }
     }
@@ -356,8 +356,8 @@ public class TableStepper {
     private int computeMinStep() {
         int minStep = Integer.MAX_VALUE;
         boolean stepFound = false;
-        for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
-            ActiveCell activeCell = (ActiveCell) iter.next();
+        for (Object activeCell1 : activeCells) {
+            ActiveCell activeCell = (ActiveCell) activeCell1;
             int nextStep = activeCell.getNextStep();
             if (nextStep >= 0) {
                 stepFound = true;
@@ -378,8 +378,8 @@ public class TableStepper {
      * @see ActiveCell#signalRowFirstStep(int)
      */
     private void signalRowFirstStep() {
-        for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
-            ActiveCell activeCell = (ActiveCell) iter.next();
+        for (Object activeCell1 : activeCells) {
+            ActiveCell activeCell = (ActiveCell) activeCell1;
             activeCell.signalRowFirstStep(rowFirstStep);
         }
     }
@@ -391,8 +391,8 @@ public class TableStepper {
      */
     private void signalNextStep(int step) {
         nextBreakClass = Constants.EN_AUTO;
-        for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
-            ActiveCell activeCell = (ActiveCell) iter.next();
+        for (Object activeCell1 : activeCells) {
+            ActiveCell activeCell = (ActiveCell) activeCell1;
             nextBreakClass = BreakUtil.compareBreakClasses(nextBreakClass,
                     activeCell.signalNextStep(step));
         }
@@ -417,8 +417,8 @@ public class TableStepper {
      */
     private int considerRowLastStep(int step) {
         rowFinished = true;
-        for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
-            ActiveCell activeCell = (ActiveCell) iter.next();
+        for (Object activeCell3 : activeCells) {
+            ActiveCell activeCell = (ActiveCell) activeCell3;
             if (activeCell.endsOnRow(activeRowIndex)) {
                 if (!activeCell.finishes(step)) {
                     rowFinished = false;
@@ -431,8 +431,8 @@ public class TableStepper {
                 log.trace("Row finished, computing last step");
             }
             int maxStep = 0;
-            for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
-                ActiveCell activeCell = (ActiveCell) iter.next();
+            for (Object activeCell2 : activeCells) {
+                ActiveCell activeCell = (ActiveCell) activeCell2;
                 if (activeCell.endsOnRow(activeRowIndex)) {
                     maxStep = Math.max(maxStep, activeCell.getLastStep());
                 }
@@ -440,8 +440,8 @@ public class TableStepper {
             if (log.isTraceEnabled()) {
                 log.trace("Max step: " + maxStep);
             }
-            for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
-                ActiveCell activeCell = (ActiveCell) iter.next();
+            for (Object activeCell1 : activeCells) {
+                ActiveCell activeCell = (ActiveCell) activeCell1;
                 activeCell.endRow(activeRowIndex);
                 if (!activeCell.endsOnRow(activeRowIndex)) {
                     activeCell.signalRowLastStep(maxStep);
@@ -493,8 +493,8 @@ public class TableStepper {
         if (log.isTraceEnabled()) {
             log.trace("Switching to row " + (activeRowIndex + 1));
         }
-        for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
-            ActiveCell activeCell = (ActiveCell) iter.next();
+        for (Object activeCell1 : activeCells) {
+            ActiveCell activeCell = (ActiveCell) activeCell1;
             activeCell.nextRowStarts();
         }
         activeCells.addAll(nextActiveCells);

Modified: 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/pdf/PDFArray.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/pdf/PDFArray.java?rev=1761020&r1=1761019&r2=1761020&view=diff
==============================================================================
--- 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/pdf/PDFArray.java 
(original)
+++ 
xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/pdf/PDFArray.java 
Fri Sep 16 11:17:35 2016
@@ -61,8 +61,8 @@ public class PDFArray extends PDFObject
         /* generic creation of PDF object */
         super(parent);
 
-        for (int i = 0, c = values.length; i < c; i++) {
-            this.values.add(values[i]);
+        for (int value : values) {
+            this.values.add(value);
         }
     }
 
@@ -75,8 +75,8 @@ public class PDFArray extends PDFObject
         /* generic creation of PDF object */
         super(parent);
 
-        for (int i = 0, c = values.length; i < c; i++) {
-            this.values.add(values[i]);
+        for (double value : values) {
+            this.values.add(value);
         }
     }
 
@@ -119,8 +119,8 @@ public class PDFArray extends PDFObject
         /* generic creation of PDF object */
         super(parent);
 
-        for (int i = 0, c = values.length; i < c; i++) {
-            this.values.add(values[i]);
+        for (Object value : values) {
+            this.values.add(value);
         }
     }
 




---------------------------------------------------------------------
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