RFR: JDK-8266670: Better modeling of access flags in core reflection [v20]
Joe Darcy
darcy at openjdk.java.net
Tue Jun 14 01:25:24 UTC 2022
On Tue, 31 May 2022 17:20:08 GMT, Rémi Forax <forax at openjdk.org> wrote:
>> Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 32 additional commits since the last revision:
>>
>> - Target JDK 20 rather than 19.
>> - Merge branch 'master' into JDK-8266670
>> - Add mask values to constants' javadoc.
>> - Implement review feedback from mlchung.
>> - Fix type in @throws tag.
>> - Merge branch 'master' into JDK-8266670
>> - Respond to review feedback.
>> - Merge branch 'master' into JDK-8266670
>> - Make workding changes suggested in review feedback.
>> - Merge branch 'master' into JDK-8266670
>> - ... and 22 more: https://git.openjdk.org/jdk/compare/3d668090...05cf2d8b
>
> src/java.base/share/classes/java/lang/module/ModuleDescriptor.java line 130:
>
>> 128: MANDATED(AccessFlag.MANDATED.mask());
>> 129:
>> 130: private int mask;
>
> it should be declared final ?
Sure; will change.
> src/java.base/share/classes/java/lang/module/ModuleDescriptor.java line 134:
>
>> 132: this.mask = mask;
>> 133: }
>> 134: private int mask() {return mask;}
>
> seem useless, `mask` can be accessed directly
Hmm. Stylistically, I prefer methods.
-------------
PR: https://git.openjdk.org/jdk/pull/7445
More information about the core-libs-dev
mailing list