8270949: Make dynamically generated classes with the class file version of the current release

Reviewed-by: alanb
This commit is contained in:
Mandy Chung 2021-07-21 18:09:38 +00:00
parent b7245c6164
commit ddce47cd3c
8 changed files with 20 additions and 7 deletions

View file

@ -340,7 +340,7 @@ class InvokerBytecodeGenerator {
final int NOT_ACC_PUBLIC = 0; // not ACC_PUBLIC
ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS + ClassWriter.COMPUTE_FRAMES);
setClassWriter(cw);
cw.visit(Opcodes.V1_8, NOT_ACC_PUBLIC + Opcodes.ACC_FINAL + Opcodes.ACC_SUPER,
cw.visit(CLASSFILE_VERSION, NOT_ACC_PUBLIC + Opcodes.ACC_FINAL + Opcodes.ACC_SUPER,
className, null, INVOKER_SUPER_NAME, null);
cw.visitSource(SOURCE_PREFIX + name, null);
return cw;