aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShigeru Chiba <chibash@users.noreply.github.com>2022-05-10 18:22:31 +0900
committerGitHub <noreply@github.com>2022-05-10 18:22:31 +0900
commitb8462575977c1cc1fa9d7ae91c79bb507f38aebf (patch)
tree128b3b8f31085caf7d0ee8cd6b3ad127a30861e8 /src
parent82e478b28515c7ca2936b3bdce92cbe5e593c7e6 (diff)
parent5d8868c03ac8527a103c09bad52be24a78d80597 (diff)
downloadjavassist-b8462575977c1cc1fa9d7ae91c79bb507f38aebf.tar.gz
javassist-b8462575977c1cc1fa9d7ae91c79bb507f38aebf.zip
Merge pull request #390 from derklaro/master
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