RFR: 8368528: HttpClient.Builder.connectTimeout should accept arbitrarily large values
Pavel Rappo
prappo at openjdk.org
Fri Oct 24 17:03:30 UTC 2025
On Fri, 24 Oct 2025 12:10:38 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
> Introduce necessary fixes to address exceptions thrown when excessive `Duration`s are provided to `Duration`-accepting `HttpClient` public APIs.
We might soon have saturating addition functionality in `java.time.Instant`; see: https://github.com/openjdk/jdk/pull/27549
I note that `jdk.internal.net.http.common.Deadline` also wants to have saturating subtraction, and I wonder if that's really needed. It seems that the two usages of the `minus` method in the codebase can be reimplemented alternatively. In which case `Deadline` could delete `minus`.
Furthermore, if there's no need for saturating subtraction, do we need the `Deadline` class? What does it provide, that `Instant` does not?
-------------
PR Review: https://git.openjdk.org/jdk/pull/27973#pullrequestreview-3377889088
More information about the net-dev
mailing list