diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/Markers.java | 20 | ||||
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java | 2 |
2 files changed, 13 insertions, 9 deletions
diff --git a/src/java/org/apache/fop/fo/flow/Markers.java b/src/java/org/apache/fop/fo/flow/Markers.java index 24da818af..392a1576e 100644 --- a/src/java/org/apache/fop/fo/flow/Markers.java +++ b/src/java/org/apache/fop/fo/flow/Markers.java @@ -20,8 +20,8 @@ package org.apache.fop.fo.flow; import java.util.HashMap; -import java.util.Iterator; import java.util.Map; +import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -81,16 +81,18 @@ public final class Markers { firstQualifyingIsFirst = new HashMap<String, Marker>(); } // first on scope: only put in new values, leave current - for (Iterator<String> iter = marks.keySet().iterator(); iter.hasNext();) { - String key = iter.next(); + Set<Map.Entry<String, Marker>> entries = marks.entrySet(); + for (Map.Entry<String, Marker> entry : entries) { + String key = entry.getKey(); + Marker marker = entry.getValue(); if (!firstQualifyingIsFirst.containsKey(key)) { - firstQualifyingIsFirst.put(key, marks.get(key)); + firstQualifyingIsFirst.put(key, marker); if (log.isTraceEnabled()) { log.trace("Adding marker " + key + " to firstQualifyingIsFirst"); } } if (!firstQualifyingIsAny.containsKey(key)) { - firstQualifyingIsAny.put(key, marks.get(key)); + firstQualifyingIsAny.put(key, marker); if (log.isTraceEnabled()) { log.trace("Adding marker " + key + " to firstQualifyingIsAny"); } @@ -106,10 +108,12 @@ public final class Markers { } } else { // first on scope: only put in new values, leave current - for (Iterator<String> iter = marks.keySet().iterator(); iter.hasNext();) { - String key = iter.next(); + Set<Map.Entry<String, Marker>> entries = marks.entrySet(); + for (Map.Entry<String, Marker> entry : entries) { + String key = entry.getKey(); + Marker marker = entry.getValue(); if (!firstQualifyingIsAny.containsKey(key)) { - firstQualifyingIsAny.put(key, marks.get(key)); + firstQualifyingIsAny.put(key, marker); if (log.isTraceEnabled()) { log.trace("Adding marker " + key + " to firstQualifyingIsAny"); } diff --git a/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java index f810d20c5..8a6b0a703 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java @@ -742,7 +742,7 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager return true; } - private class TableCellBreaker extends LocalBreaker { + private static class TableCellBreaker extends LocalBreaker { public TableCellBreaker(TableCellLayoutManager lm, int ipd, int displayAlign) { super(lm, ipd, displayAlign); |