RFR: 8268435: (ch) ChannelInputStream could override readAllBytes [v2]

Brian Burkhalter bpb at openjdk.java.net
Fri Sep 24 22:36:30 UTC 2021


On Fri, 24 Sep 2021 12:41:56 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> The overrides of readAllBytes and readNBytes in ChannelInputStream look okay.
> I don't have time to spend on the test right now but I wonder if we should create a new TestNG with simple tests rather than a expanding Basic.testNewInputStream with lots of cases. I can't immediately see if we have tests for an empty file, position at EOF, files > 2GB, and other cases that we might want to add.

The third commit, version 02, adds a TestNG test which replaces the previously expanded `Basic.testNewInputStream()`. The new test checks the expected behavior in normal operation, for a file > 2 GB, for an empty file, and for a file at EOF.

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

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


More information about the nio-dev mailing list