RFR: JDK-8289106: Add model of class file versions to core reflection [v5]

ExE Boss duke at openjdk.org
Mon Aug 1 17:41:07 UTC 2022


On Mon, 1 Aug 2022 17:04:51 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Appease jcheck.
>
> src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 101:
> 
>> 99:     PUBLIC(Modifier.PUBLIC, true,
>> 100:            Set.of(Location.CLASS, Location.FIELD, Location.METHOD,
>> 101:                   Location.INNER_CLASS)) {
> 
> Is there another way to implement this that does not create 19 anonymous classes with a single overloaded method?

Probably by creating and using shared instances of `java.util.Function` which would also allow deduplicating the code.

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

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


More information about the core-libs-dev mailing list