RFR: JDK-8266670: Better modeling of access flags in core reflection [v20]
ExE Boss
duke at openjdk.java.net
Wed Jun 1 05:03:53 UTC 2022
On Tue, 31 May 2022 17:26:35 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.java.net/jdk/compare/db2b501c...05cf2d8b
>
> src/java.base/share/classes/java/lang/reflect/Member.java line 96:
>
>> 94: */
>> 95: public default Set<AccessFlag> accessFlags() {
>> 96: return Set.of();
>
> Is is not better to throw a NoSuchMethodError instead of Set.of() if there is no implementation.
Or `AbstractMethodError`, which is what `Executable::getParameterCount()` does:
https://github.com/openjdk/jdk/blob/e751b7b1b6f7269a1fe20c07748c726536388f6d/src/java.base/share/classes/java/lang/reflect/Executable.java#L248-L258
-------------
PR: https://git.openjdk.java.net/jdk/pull/7445
More information about the core-libs-dev
mailing list