RFR: 8294047: HttpResponseInputStream swallows interrupts

Darragh Clarke duke at openjdk.org
Wed Nov 23 14:32:23 UTC 2022


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.

-------------

Commit messages:
 - Merge branch 'openjdk:master' into JDK-8294047
 - cleanup of test
 - close HttpResponseInputStream and throw exception on interrupt

Changes: https://git.openjdk.org/jdk/pull/11323/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11323&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8294047
  Stats: 173 lines in 2 files changed: 172 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/11323.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11323/head:pull/11323

PR: https://git.openjdk.org/jdk/pull/11323


More information about the net-dev mailing list