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

Brian Burkhalter bpb at openjdk.org
Wed Aug 13 16:56:52 UTC 2025


On Wed, 13 Aug 2025 16:12:07 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> normalize collapses the path so I'm concerned about foo/.. in one and bar/.. in the other.  They may collapse down to the equal paths, which may not be the right answer.
>> 
>> I think the approach of collecting the file keys along the chain is good, a match means the method can return true. Also the case where one exists and the other doesn't is good. Beyond that then I think the method will have to throw as it can't give an answer.
>
>> normalize collapses the path so I'm concerned about foo/.. in one and bar/.. in the other. They may collapse down to the equal paths, which may not be the right answer.
> 
> Good point.

Use of normalized paths removed in 1aac01a.

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

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


More information about the nio-dev mailing list