On Thu, 28 Aug 2025 23:03:11 GMT, Chen Liang <li...@openjdk.org> wrote:

>> Improve access flag reflection for preview on/off.
>> 
>> In this process, I noted javac is incorrectly injecting ACC_IDENTITY to 69.0 
>> class' `InnerClasses` attribute and fixed that.
>> 
>> There is still some inconsistency, such as implying ACC_IDENTITY when 
>> preview is on for classes. Don't know if we have discussed on this yet.
>> 
>> No new test failures.
>
> Chen Liang has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Years

src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java line 348:

> 346:                         .build(proxyDesc, clb -> {
> 347:             clb.withSuperclass(CD_Object)
> 348:                .withFlags(ACC_SUPER | ACC_FINAL | ACC_SYNTHETIC)

I presume this change is because the classfile API will be able to filter out 
ACC_SUPER based on the target version?

src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 461:

> 459:          * @jvms 4.1 The {@code ClassFile} Structure
> 460:          */
> 461:         CLASS(ACC_PUBLIC | ACC_FINAL | ACC_IDENTITY |

Shouldn't we have a mapping here for `JDK N - 1` that has ACC_SUPER instead of 
ACC_IDENTITY ? For inner classes this is not needed because inner classes could 
never have ACC_SUPER -- but regular classes could?

-------------

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1533#discussion_r2313641040
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1533#discussion_r2313636952

Reply via email to