aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorderklaro <pasqual.koschmieder@gmail.com>2021-09-07 19:22:36 +0200
committerderklaro <pasqual.koschmieder@gmail.com>2021-09-07 19:22:36 +0200
commit5d8868c03ac8527a103c09bad52be24a78d80597 (patch)
tree2f1eabce81fed86d6a4fcaa55c28dd5a37b646ea /src
parent047f7c71be30d1fce5773c8e9c014052acac14df (diff)
downloadjavassist-5d8868c03ac8527a103c09bad52be24a78d80597.tar.gz
javassist-5d8868c03ac8527a103c09bad52be24a78d80597.zip
Lower requirement for an extra type in constructor to Java 7-
Diffstat (limited to 'src')
-rw-r--r--src/main/javassist/compiler/MemberCodeGen.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/javassist/compiler/MemberCodeGen.java b/src/main/javassist/compiler/MemberCodeGen.java
index 48acd137..e8e9912b 100644
--- a/src/main/javassist/compiler/MemberCodeGen.java
+++ b/src/main/javassist/compiler/MemberCodeGen.java
@@ -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