RFR: 8294047: HttpResponseInputStream swallows interrupts [v2]
Daniel Fuchs
dfuchs at openjdk.org
Fri Nov 25 16:15:21 UTC 2022
On Fri, 25 Nov 2022 16:07:47 GMT, Darragh Clarke <duke at openjdk.org> wrote:
>> src/java.net.http/share/classes/jdk/internal/net/http/ResponseSubscribers.java line 489:
>>
>>> 487: } catch (IOException ignored) {
>>> 488: }
>>> 489: throw new InterruptedIOException();
>>
>> Thanks for doing that. Maybe we should keep the caught InterruptedException as the cause of the new InterruptedIOException. I'd suggest to add a new utility method to the `...common.Utils` class for that. I mean - something like:
>>
>> InterruptedIOException Utils.toInterruptedIOException(InterruptedException ex);
>
> So something in utils like `return new InterruptedIOException(String.valueOf(exxeption));` ?
No something that would call `initCause(ex)` to set the root cause - as AFAICS there's no constructor that takes a root cause.
-------------
PR: https://git.openjdk.org/jdk/pull/11323
More information about the net-dev
mailing list