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

Alan Bateman alanb at openjdk.org
Thu Aug 14 16:56:15 UTC 2025


On Thu, 14 Aug 2025 16:49:14 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> So ELOOP is correct and IsSameFile should thrown, right?
>
> 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.

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

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


More information about the nio-dev mailing list