RFR: 8343417: (fs) BasicFileAttributeView.setTimes uses microsecond precision with NOFOLLOW_LINKS [v2]

Brian Burkhalter bpb at openjdk.org
Tue Nov 5 17:58:10 UTC 2024


On Tue, 5 Nov 2024 16:02:09 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java line 400:
>> 
>>> 398:      * We hard code fd to FD_ATCWD and flags to AT_SYMLINK_NOFOLLOW.
>>> 399:      */
>>> 400:     static void utimensat(UnixPath path, long times0, long times1)
>> 
>> The *at methods that are supposed to map 1-1 to the similarly named sys calls so I'm a bit uncomfortable having this one work differently and hardcode dirfd  to FD_ATCWD. I wonder if we could generate a value for FD_ATCWD in UnixConstants.java.template so that the use site would more closely match the sys call.
>
>> I wonder if we could generate a value for FD_ATCWD in UnixConstants.java.template so that the use site would more closely match the sys call.
> 
> Sure, no problem.

So changed in 26feef6.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21886#discussion_r1829786228


More information about the nio-dev mailing list