提交 d0aa1911 编写于 作者: S Skylot

core: fix comodification exception

上级 039f6eeb
......@@ -21,7 +21,6 @@ import jadx.core.dex.nodes.MethodNode;
import jadx.core.utils.InstructionRemover;
import jadx.core.utils.exceptions.JadxException;
import java.util.Iterator;
import java.util.List;
public class ClassModifier extends AbstractVisitor {
......@@ -114,16 +113,13 @@ public class ClassModifier extends AbstractVisitor {
}
private static void removeSyntheticMethods(ClassNode cls) {
for (Iterator<MethodNode> it = cls.getMethods().iterator(); it.hasNext(); ) {
MethodNode mth = it.next();
for (MethodNode mth : cls.getMethods()) {
AccessInfo af = mth.getAccessFlags();
// remove bridge methods
if (af.isBridge() && af.isSynthetic() && !isMethodUniq(cls, mth)) {
// TODO add more checks before method deletion
it.remove();
mth.getAttributes().add(AttributeFlag.DONT_GENERATE);
}
// remove synthetic constructor for inner non-static classes
if (af.isSynthetic() && af.isConstructor() && mth.getBasicBlocks().size() == 2) {
List<InsnNode> insns = mth.getBasicBlocks().get(0).getInstructions();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册