Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8237057

[lworld] Upgrade lambda proxy classes to class file version 58

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • repo-valhalla
    • repo-valhalla
    • core-libs

      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>";

            mchung Mandy Chung (Inactive)
            mchung Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: