On Sun, 16 Nov 2025 18:57:09 GMT, Chen Liang <[email protected]> wrote:
>> src/java.base/share/classes/java/lang/Class.java line 2152:
>>
>>> 2150: * {@code name} and {@code parameterTypes}
>>> 2151: * @throws NoSuchMethodException if a matching method is not
>>> found, such as
>>> 2152: * when {@code parameterTypes} contains {@code null},
>>
>> It might be clearer to say "or parameterTypes contains a null element"
>> rather than "such as when ..."
>
> My impression of this behavior is that no method can have a parameter type
> array that contains a `null` value. So claiming there is no matching method
> for this scenario probably makes sense?
That might be a bit too subtle for the reader and it would be clearer to be
explicit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28336#discussion_r2532186795