aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuis Bernardo <lbernardo@apache.org>2012-10-15 00:04:26 +0000
committerLuis Bernardo <lbernardo@apache.org>2012-10-15 00:04:26 +0000
commit8d775d94555b992aa3986323c0867c2cc82c90e4 (patch)
tree19227b4297cab38c7eeff5c1e7df8ec15884d901 /src
parent9f449ff099f0b9714027d994923da2353bae408f (diff)
downloadxmlgraphics-fop-8d775d94555b992aa3986323c0867c2cc82c90e4.tar.gz
xmlgraphics-fop-8d775d94555b992aa3986323c0867c2cc82c90e4.zip
fix findbugs issues introduced with revision 1391502
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1398155 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/fo/flow/Markers.java20
-rw-r--r--src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java2
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);