JDK 9 doc-api-only RFR of 7086489: File.lastModified should accuracy as well as resolution
Brian Burkhalter
brian.burkhalter at oracle.com
Wed May 17 19:16:00 UTC 2017
Please review at your convenience.
Issue: https://bugs.openjdk.java.net/browse/JDK-7086489
Patch: [1]
Thanks,
Brian
[1] Hg mq diff
--- a/src/java.base/share/classes/java/io/File.java
+++ b/src/java.base/share/classes/java/io/File.java
@@ -923,6 +923,12 @@
* java.nio.file.Files#readAttributes(Path,Class,LinkOption[])
* Files.readAttributes} method may be used.
*
+ * @implSpec While the unit of the returned value is milliseconds, this
+ * does not imply that its accuracy is to the millisecond as some platforms
+ * may truncate the last-modified time to a less accurate value. For
+ * example if the value were truncated to seconds, then the last three
+ * digits of the returned value would all be zero.
+ *
* @return A <code>long</code> value representing the time the file was
* last modified, measured in milliseconds since the epoch
* (00:00:00 GMT, January 1, 1970), or <code>0L</code> if the
More information about the core-libs-dev
mailing list