RFR: 8264777: Overload optimized FileInputStream::readAllBytes [v7]

Alan Bateman alanb at openjdk.java.net
Sun May 16 15:56:47 UTC 2021


On Fri, 14 May 2021 15:57:48 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Any more comments on this? Thanks.

I think you've addressed the obvious bugs now but I'm still nervous that the lseek will fail for some special devices (time will tell).

It would be good to do some cleanup on the test before you integrate this. If you change it to use try-with-resources will it will avoid leaving the file open when the test fails. Also would be good to add a test for readNBytes(0) for the empty-file case. There's a typo in one of the exception messages ("expecte").

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

PR: https://git.openjdk.java.net/jdk/pull/3845


More information about the core-libs-dev mailing list