Announce: JSR 202 resources, call for contributions/help

Michael Hall mik3hall at gmail.com
Wed Dec 17 10:07:16 UTC 2014


On Dec 17, 2014, at 3:04 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 16/12/2014 22:36, Francis Galiegue wrote:
>> Hello,
>> 
>> I am, myself, a convinced user of java.nio.file; in new code, when I
>> can "afford" Java 7+, File is dead, it is as simple as that.
> One thing to say on this is that we deliberately did not deprecate java.io.File. It has lots of unfixable issues but it wasn't toxic enough to be deprecated. Instead we focused on making it easy for File and the new API to be used together and allow code migrate over time. Also you'll see that the File javadoc has several references to the new API, the motive being to point readers as methods that will often do the right thing.
> 
> I have not looked at usage in some time but initially the challenge was libraries and applications that were targeting >= JDK 6 and so could not use the new API.
> 
> Thanks for your efforts to promote the API.

Wouldn’t deprecating File be sort of like just making a further statement that it isn’t good? As Francis pointed out at this point many people still tend to use it a lot. From the past when it was the only choice there are how many millions and millions of lines of code that include it? Somehow bridging File to allow it at least the possibility to use the new API’s still seems like it would make sense to me. 
Can you deprecate use? Say that “we are giving you this usable with File but really you’d be better off using nio”. If you could do that in some way without code needing to change it seems to me it would be the best way to handle this.

Michael Hall

trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz

HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe

AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20141217/a8639804/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5262 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20141217/a8639804/smime-0001.p7s>


More information about the nio-dev mailing list