Skip to content

Commit

Permalink
Merge pull request #390 from derklaro/master
Browse files Browse the repository at this point in the history
Lower requirement for an extra type in constructor to Java 7-
  • Loading branch information
chibash committed May 10, 2022
2 parents 82e478b + 5d8868c commit b846257
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/javassist/compiler/MemberCodeGen.java
Expand Up @@ -648,7 +648,7 @@ private void atMethodCallCore2(CtClass targetClass, String mname,
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
Expand Down

0 comments on commit b846257

Please sign in to comment.