RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2]

Brian Burkhalter bpb at openjdk.org
Wed Aug 6 01:14:10 UTC 2025


On Tue, 5 Aug 2025 18:41:44 GMT, Johannes Döbler <duke at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8364277: 1) Add and use package scope isDirectoryJunction(); 2) Remove explicit delete of junction from test
>
> test/lib/jdk/test/lib/util/FileUtils.java line 449:
> 
>> 447: 
>> 448:     // Create a link from "junction" to the real path of "target"
>> 449:     public static boolean createDirectoryJunction(String junction, String target)
> 
> Suggestion: Use Path as type for parameters `junction` and `target` to avoid Path|File->String->Path|File conversions (e.g. the only caller Basic.java already has a Path object for parameter junction, why convert to a String just to recreate a File inside `createDirectoryJunction`).

Done in ebd6f41.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255636088


More information about the core-libs-dev mailing list