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

[11u] [JVMCI] JavaType.toJavaName() returns incorrect type name for lambdas

XMLWordPrintable

    • b01
    • generic
    • generic

      The implementation of JavaType.toJavaName() in JVMCI returns the wrong Java name for a lambda class. Example:

      Supplier<Runnable> lambda = () -> () -> System.out.println("run");
      ResolvedJavaType lambdaType = metaAccess.lookupJavaType(lambda.getClass());
      lambdaType.toJavaName(); // returns wrong name here

      This has been fixed in later JDKs with a JVMCI update via JDK-8225810 (JDK 14) which seems a lot more risky to backport than just the changes to MetaUtil.java which are only used internal to JVMCI.

      Thus, I'm proposing to only backport MetaUtil.java changes from JDK-8225810 to OpenJDK 11u as it fixes a debuginfo generation issue in GraalVM/Mandrel.

            sgehwolf Severin Gehwolf
            sgehwolf Severin Gehwolf
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: