]> source.dussan.org Git - javassist.git/commitdiff
Only wrap the method name if the method doesn't come from the same decl class 391/head
authorderklaro <pasqual.koschmieder@gmail.com>
Tue, 7 Sep 2021 19:44:24 +0000 (21:44 +0200)
committerderklaro <pasqual.koschmieder@gmail.com>
Tue, 7 Sep 2021 19:44:24 +0000 (21:44 +0200)
src/main/javassist/compiler/MemberCodeGen.java

index 48acd137fd68e0ddda70695902d56951ceeb462a..67a98a5c9168fa7e64aa5e8c6f796a57658173cb 100644 (file)
@@ -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;