Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java: De-deprecated-ing Tools

Once a method is marked as deprecated, are there any tools which replace these methods with non-deprecated workarounds ?

like image 549
Ande Turner Avatar asked Jun 16 '09 08:06

Ande Turner


1 Answers

If you would like to do this automatically - no.

The tool is called a programmer.


The reason is that the tools would need to profoundly understand both the deprecation, the 'un-deprecation' , your program and the target programming language.

For instance, java.util.Date.setMonth is deprecated in favour of Calendar.set(Calendar.MONTH, int month).

That is a non-trivial change to apply, since it requires replacing object instantiations, method calls, taking into account synchronisation. Actually nightmarish to do automatically.

like image 80
Robert Munteanu Avatar answered Sep 20 '22 18:09

Robert Munteanu