From 1b8a927963e643eb5f792765819cb674726e9c38 Mon Sep 17 00:00:00 2001 From: derklaro Date: Tue, 7 Sep 2021 21:44:24 +0200 Subject: Only wrap the method name if the method doesn't come from the same decl class --- src/main/javassist/compiler/MemberCodeGen.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/javassist/compiler/MemberCodeGen.java b/src/main/javassist/compiler/MemberCodeGen.java index 48acd137..67a98a5c 100644 --- a/src/main/javassist/compiler/MemberCodeGen.java +++ b/src/main/javassist/compiler/MemberCodeGen.java @@ -667,8 +667,9 @@ public class MemberCodeGen extends CodeGen { origDesc); acc = AccessFlag.setPackage(acc) | AccessFlag.STATIC; - mname = getAccessiblePrivate(mname, origDesc, desc, - minfo, declClass); + if (!isFromSameDeclaringClass(declClass, thisClass)) + mname = getAccessiblePrivate(mname, origDesc, desc, + minfo, declClass); } boolean popTarget = false; -- cgit v1.2.3