On Wed, 15 Oct 2025 19:37:33 GMT, Volkan Yazici <[email protected]> wrote:
>> test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java line 683:
>>
>>> 681: public boolean test(Throwable throwable) {
>>> 682: // `UncheckedIOException` is peeled off by
>>> `HttpClientImpl::translateSendAsyncExecFailure`
>>> 683: return throwable instanceof CustomIOException;
>>
>> We want to preserve the UncheckedIOException here. We don't want to peel it
>> off.
>
> I'm not able to follow. `UncheckedIOE` is peeled off by
> `Utils::toIOException` in `translateSendAsyncExecFailure()`. Mind elaborating
> on what are you suggesting?
Although it might look strange - we might want to wrap the UncheckedIOException
instead of peeling it off.
If the UncheckedIOException is generated by us (HttpClient implementation) then
we most likely want to peel it off. But if it originates from custom code,
peeling it off might hide important stack trace information.
I am actually hesitating between the two possibilities.
We see here that peeling of the UncheckedIOException from within sendAsync
forces you to modify one test, where the UncheckedIOException was originating
from custom code. I am not 100% sure we want do that.
On the other hand - we don't want to add yet another version of toIOException.
Let me think about this a bit more.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27787#discussion_r2435550173