RFR: 8322166: Files.isReadable/isWritable/isExecutable expensive when file does not exist [v3]
Alan Bateman
alanb at openjdk.org
Mon Dec 18 19:58:40 UTC 2023
On Mon, 18 Dec 2023 19:53:00 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Add `isReadable`, `isWritable`, and `isExecutable` methods to `AbstractFileSystemProvider` and overrides to `UnixFileSystemProvider` and use these in the respective `Files` methods when the provider is an `AbstractFileSystemProvider`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8322166: Remove superfluous ternary expression
src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java line 1034:
> 1032: int errno = access(source, R_OK);
> 1033: if (errno != 0)
> 1034: throw new UnixException(errno);
Are you going to change this one to use `new UnixException(errno).rethrowAsIOException(source);` too?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17133#discussion_r1430587801
More information about the nio-dev
mailing list