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:
“In early times every sort of advantage tends to become a military advantage; such is the best way, then, to keep it alive. But the Jewish advantage never did so; beginning in religion, contrary to a thousand analogies, it remained religious. For that we care for them; from that have issued endless consequences.”
—Walter Bagehot (18261877)
“Let me make the superstitions of a nation and I care not who makes its laws or its songs either.”
—Mark Twain [Samuel Langhorne Clemens] (18351910)