RFR: 8367067: Improve exception handling in HttpRequest.BodyPublishers [v2]
Shaojin Wen
swen at openjdk.org
Sun Sep 14 09:40:32 UTC 2025
On Mon, 8 Sep 2025 18:33:04 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> Improves exception handling of built-in `HttpClient.BodyPublisher`s to ensure exceptions get propagated in a way compliant with the reactive specification.
>
> Volkan Yazici has updated the pull request incrementally with three additional commits since the last revision:
>
> - Remove IOE rethrows
> - Revert `FilePublisherTest` and `FlowAdapterPublisherTest` changes
> - Make `CheckedIterable` throw exceptions
src/java.net.http/share/classes/jdk/internal/net/http/CheckedIterable.java line 47:
> 45: Iterator<E> iterator = iterable.iterator();
> 46: return CheckedIterator.fromIterator(iterator);
> 47: };
Suggestion:
return () -> CheckedIterator.fromIterator(iterable.iterator());
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26876#discussion_r2347220518
More information about the net-dev
mailing list