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:
“They [creative children] ask more questions than most children. Theyre usually spontaneous and enthusiastic. Their ideas are unique and occasionally strike other kids as weird. Theyre independent. Not that they dont care at all what other kids think, but theyre able to do their thing despite the fact that their peers may think its strange. And they have lots and lots of ideas.”
—Silvia Rimm (20th century)
“I care not what the sailors say:
All those dreadful thunder-stones,
All that storm that blots the day
Can but show that Heaven yawns;
Great Europa played the fool
That changed a lover for a bull.”
—William Butler Yeats (18651939)