-
Bug
-
Resolution: Fixed
-
P3
-
repo-valhalla
VM enforces the use of Q descriptors in class file with version >= 58. If used in class file version < 58, ClassFormatError is thrown to report illegal class name.
Upgrade lambda proxy class to version 58.
diff --git a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
--- a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
+++ b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
@@ -53,9 +53,8 @@
*/
/* package */ final class InnerClassLambdaMetafactory extends AbstractValidatingLambdaMetafactory {
private static final Unsafe UNSAFE = Unsafe.getUnsafe();
- private static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess();
- private static final int CLASSFILE_VERSION = 52;
+ private static final int CLASSFILE_VERSION = V14;
private static final String METHOD_DESCRIPTOR_VOID = Type.getMethodDescriptor(Type.VOID_TYPE);
private static final String JAVA_LANG_OBJECT = "java/lang/Object";
private static final String NAME_CTOR = "<init>";
Upgrade lambda proxy class to version 58.
diff --git a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
--- a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
+++ b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
@@ -53,9 +53,8 @@
*/
/* package */ final class InnerClassLambdaMetafactory extends AbstractValidatingLambdaMetafactory {
private static final Unsafe UNSAFE = Unsafe.getUnsafe();
- private static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess();
- private static final int CLASSFILE_VERSION = 52;
+ private static final int CLASSFILE_VERSION = V14;
private static final String METHOD_DESCRIPTOR_VOID = Type.getMethodDescriptor(Type.VOID_TYPE);
private static final String JAVA_LANG_OBJECT = "java/lang/Object";
private static final String NAME_CTOR = "<init>";