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:
“Have a care over my people. You have my peopledo you that which I ought to do. They are my people.... See unto themsee unto them, for they are my charge.... I care not for myself; my life is not dear to me. My care is for my people. I pray God, whoever succeedeth me, be as careful of them as I am.”
—Elizabeth I (15331603)
“Give me a thrill, says the reader,
Give me a kick;
I dont care how you succeed, or
What subject you pick.”
—Philip Larkin (19221986)