RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2]
Brian Burkhalter
bpb at openjdk.org
Thu Aug 14 16:56:13 UTC 2025
On Thu, 14 Aug 2025 16:45:41 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>>> Are you testing a loop in the file system?
>>
>> Yes, in the `linkLoop` sub-test of `IsSameFile`.
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277176512
More information about the nio-dev
mailing list