RFR: 8293331: Refactor FileChannelImpl into operating system-specific components [v3]

Alan Bateman alanb at openjdk.org
Sun Sep 18 18:07:33 UTC 2022


On Sat, 17 Sep 2022 00:44:48 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Break up `sun.nio.ch.FileChannelImpl` in a manner similar but not identical to the refactoring of `sun.nio.fs.UnixFileSystem` performed in #10093.
>
> Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
> 
>  - 8293331: Split FileDispatcherImpl into operating system-specific components
>  - Merge
>  - 8293331: Move OS-specific code to FileDispatcher; remove OS-specific FileChannelImpl classes
>  - 8293331: correct an error in the AIX FileChannelImpl.c
>  - 8293331: Refactor FileChannelImpl into operating system-specific components

I took a first pass over the latest update and it looks quite good. I assume the issue and description should be changed now as this is about refactoring of FileDispatcherImpl rather than FileChannelImpl.

Could FileChannelImpl.nd be a static field, there doesn't seen to be any reason to create one per FileChannel now. Also Unmapper shouldn't need its own now either.

Can the static initialiser that calls IOUtil.load be removed from FileChannelImpl? The library loading is pushed down to FileDispatcherImpl now so I assume it is not needed.

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

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


More information about the nio-dev mailing list