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:

    “The defects and faults of the mind are like wounds in the body; after all imaginable care has been taken to heal them up, still there will be a scar left behind, and they are in continual danger of breaking the skin and bursting out again.”
    —François, Duc De La Rochefoucauld (1613–1680)

    “Poetry asks people to have values, form opinions, care about some other part of experience besides making money and being successful on the job.”
    —Toi Derricotte (b. 1941)