RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v25]
Chen Liang
liach at openjdk.org
Fri May 16 02:05:11 UTC 2025
On Fri, 16 May 2025 01:50:06 GMT, ExE Boss <duke at openjdk.org> wrote:
>> Adam Sotona has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - removed empty line
>> - problem-listed runtime/ClassInitErrors/TestStackOverflowDuringInit.java
>
> src/java.base/share/classes/java/lang/invoke/GenerateJLIClassesHelper.java line 562:
>
>> 560: private static byte[] generateCodeBytesForLFs(String className, String[] names, LambdaForm[] forms) {
>> 561: return ClassFile.of().build(ClassDesc.ofInternalName(className), clb -> {
>> 562: clb.withFlags(ACC_PRIVATE | ACC_FINAL | ACC_SUPER)
>
> `ACC_PRIVATE` is not a valid access flag for a class, those only allow public or package access[^1]:
> Suggestion:
>
> clb.withFlags(ACC_FINAL | ACC_SUPER)
>
>
> [^1]: See **JVMS** [Table 4.1‑B](https://docs.oracle.com/javase/specs/jvms/se24/html/jvms-4.html#jvms-4.1-200-E.1)
It has been there and also for injected invoker template. Can be safely ignored.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17108#discussion_r2092203326
More information about the core-libs-dev
mailing list