RFR: 8341282: (fs) Move creation time fallback logic to Java layer (Linux)
Brian Burkhalter
bpb at openjdk.org
Tue Oct 1 16:10:36 UTC 2024
On Tue, 1 Oct 2024 08:48:12 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Move the decision as to whether `BasicFileAttributes.creationTime()` falls back to the modified time from the native layer to the Java layer.
>
> src/java.base/unix/classes/sun/nio/fs/UnixFileAttributes.java line 167:
>
>> 165: @Override
>> 166: public FileTime creationTime() {
>> 167: if (UnixNativeDispatcher.birthtimeSupported() && !birthtime_invalid) {
>
> If you invert and rename this from "invalid" to "valid" then it would improve the readability.
I agree as long as it initialized to `true`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21274#discussion_r1783141822
More information about the nio-dev
mailing list