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

Brian Burkhalter bpb at openjdk.org
Tue Aug 19 19:49:42 UTC 2025


On Tue, 19 Aug 2025 10:29:08 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8154364: Improve Unix link handling; return false instead of throwing IOException on Windows
>
> src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 393:
> 
>> 391:                 attrs2 = UnixFileAttributes.getIfExists(file2);
>> 392:         } catch (UnixException x) {
>> 393:             x.rethrowAsIOException(file1, file2);
> 
> I think it would be better to handle them separately as that will give a better exception if either fails. With the 2-arg rethrowAsIOException is mostly for move/copy ops.

Please see 78f272b.

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

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


More information about the nio-dev mailing list