RFR: 8365626: (fs) Improve handling of broken links in Files.isSameFile() (win) [v4]
Brian Burkhalter
bpb at openjdk.org
Thu Sep 11 15:16:56 UTC 2025
On Thu, 11 Sep 2025 09:02:07 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8365626: Address reviewer comments since previous commit
>
> src/java.base/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java line 483:
>
>> 481: EntryAttributes linkAttr = new EntryAttributes(attrs, h);
>> 482: if (!linkAttrs.add(linkAttr))
>> 483: throw new FileSystemLoopException(path.toString());
>
> Is this handle closed if FileSystemLoopException is thrown?
I think so: `lastLinkAttributes.handle()` is closed in the catch block if `lastLinkAttributes` is not null, and any other handle in `linkAttrs` is closed in the finally block.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27079#discussion_r2341376459
More information about the nio-dev
mailing list