Deprecate java.io.File or at least some methods (original) (raw)

Remi Forax forax at univ-mlv.fr
Mon Aug 6 12:15:28 UTC 2018


Hi all, restarting discussion about JDK-8181098, java.io.File has several severe issues so we should alert users to migrate to use java.nio.file.[Path|Files] ASAP using the deprecation mechanism (obviously not for removal).

The usual gotchas

I see two ways of deprecation, one is to deprecate the whole class, it has the advantage of making the things clear, the other is to deprecate the constructors and all methods that acts on the file of the file system. The later option allows library to still have methods that takes a java.io.File as parameter if their implementation use toPath() to perform the operations.

regards, Rémi



More information about the core-libs-dev mailing list