RFR: JDK-8266670: Better modeling of access flags in core reflection [v25]

Joe Darcy darcy at openjdk.org
Thu Jun 23 18:11:18 UTC 2022


On Tue, 14 Jun 2022 14:22:29 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Respond to review feedback.
>
> src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 104:
> 
>> 102:      */
>> 103:     PROTECTED(Modifier.PROTECTED, true,
>> 104:               Set.of(Location.FIELD, Location.METHOD, Location.INNER_CLASS)),
> 
> In both space and startup time, creating separate sets for the same set of Locations is inefficient.

Good suggestion; in a subsequent push, I'll declare private static fields on the enclosed Location enum to hold the repeated sets of Locations used for the AccessFlag constants.

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

PR: https://git.openjdk.org/jdk/pull/7445


More information about the core-libs-dev mailing list