diff --git a/util/src/main/java/com/ibm/wala/dataflow/graph/DataflowSolver.java b/util/src/main/java/com/ibm/wala/dataflow/graph/DataflowSolver.java index c1b354a14..0acf3ddf7 100644 --- a/util/src/main/java/com/ibm/wala/dataflow/graph/DataflowSolver.java +++ b/util/src/main/java/com/ibm/wala/dataflow/graph/DataflowSolver.java @@ -22,6 +22,7 @@ import com.ibm.wala.util.graph.Graph; import com.ibm.wala.util.intset.IntegerUnionFind; import java.util.Map; +import java.util.Map.Entry; import org.jspecify.annotations.NullUnmarked; import org.jspecify.annotations.Nullable; @@ -119,9 +120,9 @@ private class UnionFind { private final Object[] allKeys; private int mapIt(int i, Object[] allVars, Map varMap) { - for (Object key : varMap.keySet()) { - allKeys[i] = key; - allVars[i++] = varMap.get(key); + for (Entry entry : varMap.entrySet()) { + allKeys[i] = entry.getKey(); + allVars[i++] = entry.getValue(); } return i;