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 care nothing for all the political parties in the world except as they stand for justice.”
—Anna Howard Shaw (18471919)
“I know were not saints or virgins or lunatics; we know all the lust and lavatory jokes, and most of the dirty people; we can catch buses and count our change and cross the roads and talk real sentences. But our innocence goes awfully deep, and our discreditable secret is that we dont know anything at all, and our horrid inner secret is that we dont care that we dont.”
—Dylan Thomas (19141953)