JDK 10 RFR of 8180767: A return value of zero from java.io.File#lastModified() is ambiguous

Alan Bateman Alan.Bateman at oracle.com
Wed May 24 20:45:02 UTC 2017


On 24/05/2017 21:11, John Rose wrote:

> :
> This seems right to me.  As a casual user of core-libs I would be
> less likely to use File in new code, and take a second to look for the
> better replacement, if it were in fact solidly deprecated.
>
> Could someone file a bug/rfe to follow this up?  Debate about the ultimate
> worthiness of File could then be attached to the bug.
There was deliberate decision back a few years back not to deprecate 
File. At the time then the bar to add @Deprecated was very high and an 
API needed to be very toxic. Looking at now then several methods could 
be candidates to deprecate as they are inherently broken, deprecating 
the entire class might be too much. One other thing that was tried out 
at the time was to replace the implementation of java.io.File and 
friends to use the new code. This had the benefit of fixing dozens of 
issues (esp. on Windows) in one flick of the wrist. Sadly, subtle 
benefit changes to fix issues are also compatibility issues when dealing 
with an old API. So we chickened out from going there too.

-Alan



More information about the core-libs-dev mailing list