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 read, with a kind of hopeless envy, histories and legends of people of our craft who “do not write for money.” It must be a pleasant experience to be able to cultivate so delicate a class of motives for the privilege of doing one’s best to express one’s thoughts to people who care for them. Personally, I have yet to breathe the ether of such a transcendent sphere. I am proud to say that I have always been a working woman, and always had to be ...
    Elizabeth Stuart Phelps (1844–1911)

    Every day care center, whether it knows it or not, is a school. The choice is never between custodial care and education. The choice is between unplanned and planned education, between conscious and unconscious education, between bad education and good education.
    James L. Hymes, Jr. (20th century)