On Tue, 7 Jul 2026 15:28:17 GMT, Benjamin Peterson <[email protected]> wrote:
>> Make `MinimalFuture` cancelation atomic. This prevents HTTP request >> cancelation logic from racily completing the future with an error. >> >> >> >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Benjamin Peterson has updated the pull request incrementally with one > additional commit since the last revision: > > simplify with assertThrows test/jdk/java/net/httpclient/CancelRequestTest.java line 398: > 396: } > 397: > 398: assertThrows(CancellationException.class, cf1::get); Suggestion: CancellationException cancelX = assertThrows(CancellationException.class, cf1::get); out.println(now() + "Got expected exception: " + cancelX); test/jdk/java/net/httpclient/CancelRequestTest.java line 525: > 523: } > 524: > 525: assertThrows(CancellationException.class, cf1::get); Suggestion: CancellationException cancelX = assertThrows(CancellationException.class, cf1::get); out.println(now() + "Got expected exception: " + cancelX); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31758#discussion_r3537848487 PR Review Comment: https://git.openjdk.org/jdk/pull/31758#discussion_r3537839904
