RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2]

Brian Burkhalter bpb at openjdk.org
Thu Aug 14 16:56:16 UTC 2025


On Thu, 14 Aug 2025 16:51:56 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> It depends whether we want to support a case such as
>> ```L1 -> L2 -> L3 -> L1 ...```.
>> Depending on what is specified, then for example `isSameFile(L1,L3)` should either throw or return `true`. In the current version, it is the latter.
>
> It's a loop in the file system and not unreasonable for isSameFile to throw.

Okay, then I'll switch it to use `getIfExists` and update the test.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277186957


More information about the nio-dev mailing list