Bug in File.getLastModified()
ric.almeida at gmail.com
Fri Mar 31 08:28:53 UTC 2017
I agree with Sean, as said in the bug. The reason we have in the
documentation that it can be possibly truncated is most likely related
to older linux's that wouldn't support it... If the data is there and
available, why explicitly truncate it?
Also note that the workaround also doesn't work in Ubuntu with Oracle JDK 8u121.
Regarding causing subtle bugs, I believe current behavior can cause
more issues... As that was the reason why I open this bug. Everything
was working fine in the most developers machines (windows) and bugs
occurred in production (linux with oracle jdk)...
On 31 March 2017 at 01:49, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> As noted in , it looks like the specification  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 ), I would be inclined to
> resolve this as Not an Issue.
> On Mar 30, 2017, at 5:47 AM, Seán Coffey <sean.coffey at oracle.com> wrote:
> I see that JDK-8177809  has been logged.
>  https://bugs.openjdk.java.net/browse/JDK-8177809
More information about the core-libs-dev