Skip to content

Commit

Permalink
Disable creation time verification on Linux
Browse files Browse the repository at this point in the history
Closes gh-40423
  • Loading branch information
mhalbritter committed Apr 18, 2024
1 parent 20e291d commit 3479304
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.Runtime.Version;
import java.nio.file.Files;
import java.nio.file.LinkOption;
import java.nio.file.attribute.BasicFileAttributeView;
Expand Down Expand Up @@ -134,10 +133,11 @@ private FileTime expectedCreationTime() {
: CREATION_TIME;
}
if (OS.LINUX.isCurrentOs()) {
// Linux uses the modified time until Java 21.0.2 where a bug means that it
// uses the birth time which it has not set, preventing us from verifying it.
// Linux uses the birth time which it has not set, preventing us from
// verifying it.
// https://github.com/openjdk/jdk21u-dev/commit/4cf572e3b99b675418e456e7815fb6fd79245e30
return (Runtime.version().compareTo(Version.parse("21.0.2")) >= 0) ? null : LAST_MODIFIED_TIME;
// https://github.com/openjdk/jdk17u-dev/commit/184fac8af61633ccf833eda53183a27da8efb0f7
return null;
}
return CREATION_TIME;
}
Expand Down

0 comments on commit 3479304

Please sign in to comment.