RFR: 8365626: (fs) Improve handling of broken links in Files.isSameFile() (win)
Alan Bateman
alanb at openjdk.org
Sat Sep 6 16:04:12 UTC 2025
On Fri, 5 Sep 2025 17:34:34 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Okay, but the concern is that user code may be stashing XXFileAttribute objects into collections so we can't have equals/hashCode be based solely on the file key when that is only reliable when the file is open. Also equality is problematic when the timestamps or other values aren't equal.
>
> I'll change it to work without `equals`. I don't think it's essential.
One thing to try is renaming AttrsAndHandle to LinkAttributes and have it override equals/hashCode. That will also solve the issue with keeping the handle to each open link.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27079#discussion_r2327792953
More information about the nio-dev
mailing list