Java source refactoring of 7000 references

前端 未结 12 1132
醉梦人生
醉梦人生 2020-12-25 13:05

I need to change the signature of a method used all over the codebase.

Specifically, the method void log(String) will take two additional arguments (

12条回答
  •  悲&欢浪女
    2020-12-25 13:33

    I think that there are several steps to dealing with this, as it is not just a technical issue but a 'situation':

    1. Decline to do it in short order due to the risk.
    2. Point out the issues caused by not using standard frameworks but reinventing the wheel (as Paul says).
    3. Insist on using Log4j or equivalent if making the change.
    4. Use Eclipse refactoring in sensible chunks to make the changes and deal with the varying defaults.

    I have used Eclipse refactoring on quite large changes for fixing old smelly code - nowadays it is fairly robust.

提交回复
热议问题