On Tue, 4 Aug 2026 23:28:16 GMT, Chen Liang <[email protected]> wrote:

>> Document that `java.net.http.HttpResponse#body()` can return null.
>> 
>> ---------
>> - [X] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> 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 think you should add something like `The body may be {@code null}.` in the 
> first paragraph instead of as part of the notes.

`@apiNote` was suggested by @dfuch, see [JDK-8328894]. I will wait for him to 
comment on this.

[JDK-8328894]: https://bugs.openjdk.org/browse/JDK-8328894

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32196#discussion_r3718689280

Reply via email to