RFR: 8209137: Add ability to bind to specific local address to HTTP client [v19]
Daniel Fuchs
dfuchs at openjdk.java.net
Wed May 11 12:19:00 UTC 2022
On Wed, 11 May 2022 11:34:33 GMT, Michael McMahon <michaelm at openjdk.org> wrote:
>> Hello Michael,
>> Most users will be using the `HttpClient.newBuilder()` to create the builder, so this note about `UnsupportedOperationException` can be confusing. However, for implementations (libraries?) which provide their own implementation of the `java.net.http.HttpClient.Builder`, I think, this note would be relevant. This approach is similar to what we already have on `java.net.http.HttpClient.newWebSocketBuilder()` method.
>
> Sure, I just think when most developers read "The default implementation of this method throws UOE" they will think they can't use it without implementing something themselves. Library developers will figure it out anyway.
This is the standard wording that has been used throughout the JDK to document the behavior of default methods on interfaces. Unless we receive different feedback during the CSR review I'd suggest to leave it that way. The second sentence makes it clear that our concrete implementations override that default behavior.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6690
More information about the net-dev
mailing list