On Wed, 5 Aug 2026 12:16:03 GMT, Jean-Noël Rouvignac <[email protected]> wrote:
>> src/java.net.http/share/classes/java/net/http/HttpResponse.java line 167:
>>
>>> 165: * @apiNote
>>> 166: *
>>> 167: * Exactly when {@code null} can be returned is implementation
>>> dependent. It
>>
>> I agree with @liach that the last sentence before the note makes the current
>> note text a bit confusing. I'd suggest to update the note text as follows:
>>
>> Suggestion:
>>
>> * Depending on the response's {@linkplain #statusCode() status code} a
>> body may not always
>> * be available, and an implementation may return {@code null} in such
>> cases.
>> * Exactly when {@code null} can be returned is implementation
>> dependent. It
>
> It's a bit bizarre that `@return` doesn't mention `null`, even if it was just
> to mention "look at the implNote". That said, I don't know if the second part
> of the previous sentence is something accepted in openjdk.
@JnRouvignac, it now does, see ca32e64c3cf.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32196#discussion_r3734630006