On Wed, 1 Jun 2022 05:01:33 GMT, ExE Boss <[email protected]> wrote:
>> 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
Actually, it should probably be `UnsupportedOperationException` instead.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7445