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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: core-libs
    • Labels:

      Description

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

        Attachments

          Activity

            People

            • Assignee:
              mchung Mandy Chung
              Reporter:
              mchung Mandy Chung
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: