You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug is specific to Corretto 8. It cannot be reproduced under
Azul Zulu 8.78.0.19 (JDK 8.0.412+8)
Eclipse Temurin 8.0.412+8
Amazon Corretto 11.0.23.9.1
Describe the bug
On Linux x86-64, file ctime, mtime, and atime returned from Corretto 8 java.nio.Files.readAttributes() only have second precision. This seems to be caused by a lack of these lines from OpenJDK in Corretto 8. It causes Corretto to act in a different way compared to other OpenJDK vendors.
Confusingly, java.io.File.lastModified() does return timestamps with millisecond precision, making Corretto internally inconsistent.
I expect the two ways to get file mtime (via java.io and java.nio) to return the same value (one with millisecond precision). I also expect ctime and atime to return timestamps with millisecond precision. This is the behavior on Azul Zulu and Eclipse Temurin.
@mrserb Note though: I would expect java.io.File.lastModified() to have more compatibility impact than NIO, but the behavior of that was changed in 4b000c7
This bug is specific to Corretto 8. It cannot be reproduced under
Describe the bug
On Linux x86-64, file ctime, mtime, and atime returned from Corretto 8
java.nio.Files.readAttributes()
only have second precision. This seems to be caused by a lack of these lines from OpenJDK in Corretto 8. It causes Corretto to act in a different way compared to other OpenJDK vendors.Confusingly,
java.io.File.lastModified()
does return timestamps with millisecond precision, making Corretto internally inconsistent.To Reproduce
TestFileTime.java:
Expected behavior
I expect the two ways to get file mtime (via java.io and java.nio) to return the same value (one with millisecond precision). I also expect ctime and atime to return timestamps with millisecond precision. This is the behavior on Azul Zulu and Eclipse Temurin.
Platform information
OS:
Version:
The text was updated successfully, but these errors were encountered: