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:

    School divides life into two segments, which are increasingly of comparable length. As much as anything else, schooling implies custodial care for persons who are declared undesirable elsewhere by the simple fact that a school has been built to serve them.
    Ivan Illich (b. 1926)

    Risk! Risk anything! Care no more for the opinion of others, for those voices. Do the hardest thing on earth for you. Act for yourself. Face the truth.
    Katherine Mansfield (1888–1923)