Skip to content

Commit

Permalink
fix: rename method wrapped by synthetic only from same class (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Jan 16, 2019
1 parent 7c353a6 commit 618b014
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 618b014

Please sign in to comment.