RFR: 8338716: Re-visit "interrupt handling" in jdk.internal.loader.Resource
Alan Bateman
alanb at openjdk.org
Wed Aug 28 06:35:24 UTC 2024
On Tue, 27 Aug 2024 21:57:16 GMT, Brent Christian <bchristi at openjdk.org> wrote:
> Vestiges of it remain in jdk.internal.loader.Resource.getBytes(), and should be removed.
Yes, but aside from cleanup, this also fixes a bug where it clears the interrupt status and doesn't restore it. Good to get this fixed.
src/java.base/share/classes/jdk/internal/loader/Resource.java line 89:
> 87: // can propagate upwards without being caught too early
> 88: InputStream in = cachedInputStream();
> 89: int len = getContentLength();
Pre-existing question but I wonder if this should move into the try block so that the input stream is closed in the event of getContentLength failing.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20736#issuecomment-2314427102
PR Review Comment: https://git.openjdk.org/jdk/pull/20736#discussion_r1734072287
More information about the core-libs-dev
mailing list