RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2]
Brian Burkhalter
bpb at openjdk.org
Thu Aug 14 15:06:19 UTC 2025
On Thu, 14 Aug 2025 06:41:52 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> 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/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 394:
>
>> 392: // check existence while following linkx
>> 393: boolean exists1 = exists(file1);
>> 394: boolean exists2 = exists(file2);
>
> Did you try to using UnixFileAttribtues.getIfExists? That would remove the need for access(2) from the common case. We can add getIfExists(UnixPath path, boolean followLinks) if needed.
No, but I'll investigate.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2276898431
More information about the nio-dev
mailing list