mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8270949: Make dynamically generated classes with the class file version of the current release
Reviewed-by: alanb
This commit is contained in:
parent
b7245c6164
commit
ddce47cd3c
8 changed files with 20 additions and 7 deletions
|
@ -25,6 +25,7 @@
|
|||
|
||||
package java.lang.reflect;
|
||||
|
||||
import jdk.internal.misc.VM;
|
||||
import jdk.internal.org.objectweb.asm.ClassWriter;
|
||||
import jdk.internal.org.objectweb.asm.Label;
|
||||
import jdk.internal.org.objectweb.asm.MethodVisitor;
|
||||
|
@ -55,7 +56,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
|||
* "generateProxyClass" method.
|
||||
*/
|
||||
final class ProxyGenerator extends ClassWriter {
|
||||
|
||||
private static final int CLASSFILE_VERSION = VM.classFileVersion();
|
||||
private static final String JL_CLASS = "java/lang/Class";
|
||||
private static final String JL_OBJECT = "java/lang/Object";
|
||||
private static final String JL_THROWABLE = "java/lang/Throwable";
|
||||
|
@ -455,7 +456,7 @@ final class ProxyGenerator extends ClassWriter {
|
|||
* class file generation process.
|
||||
*/
|
||||
private byte[] generateClassFile() {
|
||||
visit(V14, accessFlags, dotToSlash(className), null,
|
||||
visit(CLASSFILE_VERSION, accessFlags, dotToSlash(className), null,
|
||||
JLR_PROXY, typeNames(interfaces));
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue