Issue
I am currently on a task, where I need to fix the deprecated items in the existing projects. I mean I have to replace the deprecated items with the corresponding replacing items as given in javadocs,
Eg: java.util.Date.setSeconds(int): Instead of this deprecated method, we need to use Calendar.set(Calendar.SECOND, int seconds).
I need to automate this using java code in eclipse IDE, by giving a project name in the workspace as input.
Kindly suggest me in doing this.
Thanks in advance.
Solution
I would go with the search & replace functionality of your IDE, by utilizing regex. (your parameter values should be captured with regex)
There isn't any specific utility to replace deprecated code, because it is not always that case that there is a straightforward replacement. Sometimes there is not replacement, and in other cases there is a completely different approach.
Answered By - Bozho
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.