On Mon, 5 Dec 2022 14:13:42 GMT, Daniel Fuchs <[email protected]> wrote:
>> src/java.net.http/share/classes/jdk/internal/net/http/ResponseSubscribers.java
>> line 488:
>>
>>> 486: close();
>>> 487: } catch (IOException ignored) {
>>> 488: }
>>
>> I don't have specific opinion here and this is more of a question - should
>> we be doing:
>>
>>
>> } catch (InterruptedException ex) {
>> final IOException toThrow = new IOException(ex);
>> try {
>> close();
>> } catch (IOException ignored) {
>> toThrow.addSuppressed(ignored);
>> }
>> Thread.currentThread().interrupt();
>> throw toThrow;
>> }
>>
>> i.e. should we be adding any failure to close() as a suppressed exception to
>> the IOException that we throw?
>
> I am not sure whether that would be helpful or confusing.
I think that's a good point, I don't really have a strong opinion one way or
the other on it but would be curious if anyone else does?
-------------
PR: https://git.openjdk.org/jdk/pull/11323