RFR: 8292698: Improve performance of DataInputStream

Daniel Fuchs dfuchs at openjdk.org
Wed Aug 24 10:18:37 UTC 2022


On Wed, 24 Aug 2022 06:17:19 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> I can't imagine a subclass of DataInputStream setting 'in' to null. If it handles async close then it's possible that it replaces it with an input stream where read throws IOException unconditionally. This is why the original patch was problematic for the methods that call in.read in a loop. The updated patch is probably okay, I'm just pointing out that we are forced to think of subclasses when touching this code.

Thanks Alan - that makes sense to me.

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

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


More information about the core-libs-dev mailing list