From: derklaro Date: Tue, 7 Sep 2021 19:44:24 +0000 (+0200) Subject: Only wrap the method name if the method doesn't come from the same decl class X-Git-Tag: rel_3_29_0_ga~7^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1b8a927963e643eb5f792765819cb674726e9c38;p=javassist.git Only wrap the method name if the method doesn't come from the same decl class --- 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;