On Mon, 11 Sep 2023 22:22:47 GMT, Brian Burkhalter <[email protected]> wrote:
> On Windows, do not return `true` from the `java.io.File` methods
> `setReadable(boolean, boolean)` and `setExecutable(boolean, boolean)` if the
> file does not exist.
src/java.base/windows/native/libjava/WinNTFileSystem_md.c line 479:
> 477: if (access == java_io_FileSystem_ACCESS_READ ||
> 478: access == java_io_FileSystem_ACCESS_EXECUTE) {
> 479: return _waccess(pathbuf, 0) == 0 ? enable : JNI_FALSE;
Here `enable` is returned for backward compatibility, but per the specification
it seems that `JNI_TRUE` should be returned instead.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15673#discussion_r1322263371