On Mon, 3 Nov 2025 12:05:31 GMT, Daniel Fuchs <[email protected]> wrote:
>> EunHyunsu has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> 8271091: Add NPE messages for method
>
> src/java.net.http/share/classes/jdk/internal/net/http/HttpRequestBuilderImpl.java
> line 226:
>
>> 224: @Override
>> 225: public HttpRequest.Builder method(String method, BodyPublisher
>> body) {
>> 226: requireNonNull(method);
>
> It seems strange to improve the message for `body` but not for `method`.
I agree for consistency.
I'll update the `requireNonNull(method)` call to include an explicit message as
well, e.g.,
`requireNonNull(method, "HTTP method must be non-null")`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28103#discussion_r2486295432