RFR: 8365626: (fs) Improve handling of broken links in Files.isSameFile() (win) [v4]
Brian Burkhalter
bpb at openjdk.org
Tue Sep 16 15:32:55 UTC 2025
On Tue, 16 Sep 2025 07:34:46 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> [...] is the handle closed if linkAttrs.add(linkAttr) fails and FileSystemLoopException is thrown?
I was mistakenly thinking that if the object was not added to the set, then it will have the same handle as one of the objects already in the set, but this is patently untrue. I should check whether two different handles referring to the same file actually end up with equal volume serial numbers and file indexes, which is what one would expect. As to the specific question, I think an explicit CloseHandle is called for here as well.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27079#discussion_r2352892215
More information about the nio-dev
mailing list