On Tue, 17 Oct 2023 13:22:29 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> 
wrote:

>> Per Minborg has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Update naming and javadocs
>
> src/java.base/share/classes/java/util/function/BiConsumer.java line 105:
> 
>> 103:      */
>> 104:     static <T, U> BiConsumer<T, U> of(BiConsumer<T, U> uncaptured) {
>> 105:         return Objects.requireNonNull(uncaptured);
> 
> This does more than just capturing: not sure if the `null` check is generally 
> useful here and elsewhere.

I have added a `@throws NullPointerException if source is null` clause where 
needed. I think there is no valid use case for providing null as a parameter 
and so I believe this is a desired property of the contemplated methods. 
However, there might be contrary arguments that I have not seen?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16213#discussion_r1363455782

Reply via email to