]> source.dussan.org Git - javassist.git/commitdiff
Lower requirement for an extra type in constructor to Java 7- 390/head
authorderklaro <pasqual.koschmieder@gmail.com>
Tue, 7 Sep 2021 17:22:36 +0000 (19:22 +0200)
committerderklaro <pasqual.koschmieder@gmail.com>
Tue, 7 Sep 2021 17:22:36 +0000 (19:22 +0200)
src/main/javassist/compiler/MemberCodeGen.java

index 48acd137fd68e0ddda70695902d56951ceeb462a..e8e9912b269371acd5b7c121dec4433d0ccaeb89 100644 (file)
@@ -648,7 +648,7 @@ public class MemberCodeGen extends CodeGen {
                 throw new CompileError("no such constructor: " + targetClass.getName());
 
             if (declClass != thisClass && AccessFlag.isPrivate(acc)) {
-                if (declClass.getClassFile().getMajorVersion() < ClassFile.JAVA_11
+                if (declClass.getClassFile().getMajorVersion() < ClassFile.JAVA_8
                         || !isFromSameDeclaringClass(declClass, thisClass)) {
                     desc = getAccessibleConstructor(desc, declClass, minfo);
                     bytecode.addOpcode(Opcode.ACONST_NULL); // the last parameter