diff --git a/src/main/java/soot/dexpler/DexBody.java b/src/main/java/soot/dexpler/DexBody.java index 20c2c58e640..d9766aa7f19 100755 --- a/src/main/java/soot/dexpler/DexBody.java +++ b/src/main/java/soot/dexpler/DexBody.java @@ -36,6 +36,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; +import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -789,7 +790,7 @@ public Body jimplify(Body b, SootMethod m) { UnconditionalBranchFolder.v().transform(jBody); } DexFillArrayDataTransformer.v().transform(jBody); - //SharedInitializationLocalSplitter destroys the inserted casts, so we have to reintroduce them + // SharedInitializationLocalSplitter destroys the inserted casts, so we have to reintroduce them convertFloatsAndDoubles(b, jimple); TypeAssigner.v().transform(jBody); @@ -952,7 +953,6 @@ public Body jimplify(Body b, SootMethod m) { DexReturnPacker.v().transform(jBody); for (Unit u : jBody.getUnits()) { - if (u instanceof AssignStmt) { AssignStmt ass = (AssignStmt) u; if (ass.getRightOp() instanceof CastExpr) { @@ -1092,14 +1092,16 @@ public void convertFloatsAndDoubles(Body b, final Jimple jimple) { /** * Removes all dexpler specific tags. Saves some memory. - * @param unit the statement + * + * @param unit + * the statement */ private void removeDexplerTags(Unit unit) { - for (Tag t : unit.getTags()) { + for (Iterator it = unit.getTags().iterator(); it.hasNext();) { + Tag t = it.next(); if (t instanceof DexplerTag) { - unit.removeTag(t.getName()); + it.remove(); } - } }