Rename Method - Take Care

Take Care

Although it seems to be very easy to change a method name, code can be broken if refactoring tools (built into many modern IDE's) are not used to also change all code that refers to the existing method.

If a codebase has provided an external API that including the existing method name then the existing function should not be removed, but 'deprecated' over time and finally removed at a future date. In this case the "Copy Method" refactoring can be considered as an alternative.

Java 5.0 provides the annotation @Override to help protect against mistakes such as this.

Read more about this topic:  Rename Method

Famous quotes containing the word care:

    I am not sure how many “sins” I would recognize in the world. Some would surely be defused by changed circumstances. But I can imagine none that is more irredeemably sinful than the betrayal, the exploitation, of the young by those who should care for them.
    Elizabeth Janeway (b. 1913)

    Parents don’t make mistakes because they don’t care, but because they care so deeply.
    T. Berry Brazelton (20th century)