On Fri, 2 Dec 2022 16:17:32 GMT, Darragh Clarke <[email protected]> wrote:
>> Currently if a `HttpResonseInputStream` gets interrupted while reading it
>> will just swallow the exception and continue,
>>
>> This PR changes it to close the stream and throw an IOException, I added a
>> test to cover this which just uses two threads to read the stream then
>> interrupt it.
>
> Darragh Clarke has updated the pull request incrementally with one additional
> commit since the last revision:
>
> check thread interrupt status is set
test/jdk/java/net/httpclient/HttpResponseInputStreamInterruptTest.java line 83:
> 81:
> 82: @Test
> 83: public void test() {
To keep this method relatively simpler, you could remove the top level
try/catch block (which just catches and rethrows) and change this method's
signature to `throws Exception`. If you decide to leave it in the current form,
that's fine too.
-------------
PR: https://git.openjdk.org/jdk/pull/11323