RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v8]
Brian Burkhalter
bpb at openjdk.org
Mon Aug 18 16:12:13 UTC 2025
On Fri, 15 Aug 2025 20:43:41 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8154364: Put changes to Misc.java in platform-specific blocks
test/jdk/java/nio/file/Files/Misc.java line 118:
> 116: * Test: Neither file exists
> 117: */
> 118: if (Platform.isWindows()) {
On second thought, I don't think the sections beginning here, at line 118, and below, at line 139, should differ between Unix and Windows. I think it would be better to change the Windows implementation in the context of this request to return false instead of throwing `IOException`, and investigate any more complicated link checking when addressing https://bugs.openjdk.org/browse/JDK-8365626.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2282840096
More information about the nio-dev
mailing list