RFR: 8336675: Remove UnixFileSystemProvider.checkPath in favor of UnixPath.toUnixPath
Andrey Turbanov
aturbanov at openjdk.org
Wed Jul 17 19:38:57 UTC 2024
On Fri, 12 Jul 2024 11:54:15 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> Implementation of both methods is the same.
> https://github.com/openjdk/jdk/blob/9b6f6c5c9dd6d0fbb056e8d84c3a0888a3320edf/src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java#L129-L135
>
> https://github.com/openjdk/jdk/blob/9b6f6c5c9dd6d0fbb056e8d84c3a0888a3320edf/src/java.base/unix/classes/sun/nio/fs/UnixPath.java#L172-L179
>
> `UnixPath.toUnixPath` is already used by UnixFileSystemProvider in multiple places. Two more usages shouldn't cause problems.
BTW, after my changes, implementations of `sun.nio.fs.UnixFileSystemProvider#newFileChannel` and `sun.nio.fs.UnixFileSystemProvider#newByteChannel` are now identical too. Should we just call `newFileChannel` from `newByteChannel` ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20155#issuecomment-2225429645
More information about the nio-dev
mailing list