[lworld] RFR: 8294678: [lworld] Update AccessFlags tests to include ACC_IDENTITY and ACC_VALUE [v3]

Mandy Chung mchung at openjdk.org
Wed Oct 5 18:38:44 UTC 2022


On Wed, 5 Oct 2022 17:41:12 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> My goal was to have the Class.accessFlags() be consistent with Class methods `isIdentity()` and `isValue()`.
>> Unless we prevail in adding ACC_IDENTITY and ACC_VALUE to Class.getModifiers() there will be an inconsistency among the APIs.  `getModifiers()`, though the oldest, has the least flexibility.  The goal of the AccessFlags API was to be more flexible, correct, and extensible.  It is a question of what the end state should be and how to get there.
>> (The check for isArray() to select the INNER_CLASS location was from the original AccessFlag PR.)
>
> I'd like to commit this PR as is on this point and propose a separate PR to add ACC_IDENTITY and ACC_VALUE to the modifiers for arrays to be able to judge the impact and get further review.
> https://bugs.openjdk.org/browse/JDK-8294866

I agree that we should discuss the modifiers for arrays in a follow-on issue.   I suggest this PR to keep  `Class::getModifiers` and `Class::accessFlags` consistent to match the specification.    JDK-8294866 will do the spec change altogether.

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

PR: https://git.openjdk.org/valhalla/pull/775



More information about the valhalla-dev mailing list