Bug in File.getLastModified()

Brian Burkhalter brian.burkhalter at oracle.com
Fri Mar 31 00:49:39 UTC 2017


As noted in [1], it looks like the specification [2] already dealt with the situation via the "possibly truncated" phrase: 

"If the operation succeeds and no intervening operations on the file take place, then the next invocation of the lastModified() method will return the (possibly truncated) time argument that was passed to this method.”

Given the existence of a workaround and the possibility of causing subtle bugs (as noted by Stuart in the issue comments [1]), I would be inclined to resolve this as Not an Issue.

Thanks,

Brian

On Mar 30, 2017, at 5:47 AM, Seán Coffey <sean.coffey at oracle.com> wrote:

> I see that JDK-8177809 [1] has been logged.
> 
> […]
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8177809

[2] http://download.java.net/java/jdk9/docs/api/java/io/File.html#setLastModified-long-


More information about the core-libs-dev mailing list