From 618b014b3dfc3f71514b50ac95054e382d15b104 Mon Sep 17 00:00:00 2001 From: Skylot Date: Wed, 16 Jan 2019 22:14:46 +0300 Subject: [PATCH] fix: rename method wrapped by synthetic only from same class (#430) --- .../src/main/java/jadx/core/dex/visitors/ClassModifier.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jadx-core/src/main/java/jadx/core/dex/visitors/ClassModifier.java b/jadx-core/src/main/java/jadx/core/dex/visitors/ClassModifier.java index ed1e6a7e30a..5e01741f22c 100644 --- a/jadx-core/src/main/java/jadx/core/dex/visitors/ClassModifier.java +++ b/jadx-core/src/main/java/jadx/core/dex/visitors/ClassModifier.java @@ -221,6 +221,10 @@ private static boolean checkSyntheticWrapper(MethodNode mth, InsnNode insn) { if (callMth.getArgsCount() != mth.getMethodInfo().getArgsCount()) { return false; } + // rename method only from current class + if (!mth.getParentClass().equals(wrappedMth.getParentClass())) { + return false; + } // all args must be registers passed from method args (allow only casts insns) for (InsnArg arg : insn.getArguments()) { if (!registersAndCastsOnly(arg)) {