RFR: 8371009: HttpClient javadoc synchronous example missing HttpRequest variable declaration [v2]

EunHyunsu duke at openjdk.org
Fri Oct 31 12:58:40 UTC 2025


On Fri, 31 Oct 2025 10:55:14 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> EunHyunsu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Apply review suggestion: create client before request in HttpClient example
>
> src/java.net.http/share/classes/java/net/http/HttpClient.java line 101:
> 
>> 99:  *       .uri(URI.create("https://foo.com/"))
>> 100:  *       .build();
>> 101:  *
> 
> Thanks for working on this patch!
> 
> I would put the creation of the request after the creation of the client. Logically you would create the client first.

Thank you for the review!
I’ve updated the example to create the client before the request, as suggested.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28084#discussion_r2481322425


More information about the net-dev mailing list