aws / aws-sdk-java-v2

The official AWS SDK for Java - Version 2
Apache License 2.0
2.17k stars 840 forks source link

Allow calling `close` after `abort` on a `ResponseInputStream`. #5481

Closed millems closed 1 month ago

millems commented 1 month ago

Before this change, calling close after abort would raise an IOException. It's well-understood that streams should be closed after they're done being used. This was not possible before this change, if abort was called.

As a side effect of this change, abort now calls close on the underlying input stream. This is the behavior of the 1.x SDK, so it is low-risk.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud