RFR: 8233451: (fs) Files.newInputStream() cannot be used with character special files [v4]

Alan Bateman alanb at openjdk.org
Tue Oct 22 10:20:14 UTC 2024


On Tue, 22 Oct 2024 02:40:44 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Add `isOther` and `available` methods to `FileChannelImpl` and the interfaces to native code and use these in `ChannelInputStream` to work around cases where a wrapped `FileChannelImpl` is not really seekable.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8233451: Add tests for read{All,N}Bytes

This update looks good, just a bit minor nits. I assume you'll run the test many tests on all platforms to ensure its stability before integrating.

test/jdk/java/nio/file/Files/InputStreamTest.java line 29:

> 27:  * @library .. /test/lib
> 28:  * @build jdk.test.lib.Platform
> 29:  * @run junit InputStreamTest

I think this will need --enable-native-access=ALL-UNNAMED.

test/jdk/java/nio/file/Files/InputStreamTest.java line 99:

> 97:                     try {
> 98:                         try (FileOutputStream fos = new FileOutputStream(PIPE);)
> 99:                         {

The formatting is a bit messed up, I think a previous iteration has a second resource that is now removed.

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

Marked as reviewed by alanb (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21508#pullrequestreview-2384729469
PR Review Comment: https://git.openjdk.org/jdk/pull/21508#discussion_r1810439366
PR Review Comment: https://git.openjdk.org/jdk/pull/21508#discussion_r1810441547


More information about the nio-dev mailing list