On Wed, 29 Oct 2025 19:16:03 GMT, Daniel Fuchs <[email protected]> wrote:

>> Introduce necessary fixes to address exceptions thrown when excessive 
>> `Duration`s are provided to `Duration`-accepting `HttpClient` public APIs.
>
> src/java.net.http/share/classes/jdk/internal/net/http/common/Deadline.java 
> line 321:
> 
>> 319:         }
>> 320:     }
>> 321: 
> 
> Do we need to change this method? I would just revert them.

`Duration#between(Temporal,Temporal)` can throw `DateTimeException` and 
`ArithmeticException`, but not in our case due to the reason I elaborated in 
the comment. In this change, I've removed these two exceptions from the 
Javadoc, since they cannot happen.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27973#discussion_r2475376403

Reply via email to