RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2]
ExE Boss
duke at openjdk.org
Thu Aug 14 07:12:17 UTC 2025
On Wed, 13 Aug 2025 16:56:52 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: Remove assertion that two non-existent files with equal normalized paths are equal
src/java.base/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java line 478:
> 476:
> 477: // neither exists, compare normalized paths without filesystem access
> 478: return obj1.normalize().equals(obj2.normalize());
This `Path::normalize` call was missed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2275684211
More information about the nio-dev
mailing list