From 374e7bae7a7f22b04e0e093e355ac685be849bef Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Wed, 17 May 2017 14:29:26 -0700 Subject: [PATCH] 7086489: File.lastModified should accuracy as well as resolution Add an @apiNote indicating that the last-modified time might be of coarser than millisecond granularity. Reviewed-by: smarks --- jdk/src/java.base/share/classes/java/io/File.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jdk/src/java.base/share/classes/java/io/File.java b/jdk/src/java.base/share/classes/java/io/File.java index 6e77026c6c1..e9959b59acd 100644 --- a/jdk/src/java.base/share/classes/java/io/File.java +++ b/jdk/src/java.base/share/classes/java/io/File.java @@ -923,6 +923,12 @@ public class File * java.nio.file.Files#readAttributes(Path,Class,LinkOption[]) * Files.readAttributes} method may be used. * + * @apiNote + * While the unit of time of the return value is milliseconds, + * the granularity of the value depends on the underlying + * file system and may be larger. For example, some + * file systems use time stamps in units of seconds. + * * @return A long value representing the time the file was * last modified, measured in milliseconds since the epoch * (00:00:00 GMT, January 1, 1970), or 0L if the