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:
“It is cowardly to fly from natural duties and take up those that suit our taste or temperament better; but it is also unwise to take an exaggerated view of personal duties, which shuts out the proper care of the mind and body entrusted to us.”
—Ellen Henrietta Swallow Richards (18421911)
“TAKE CARE TO SELL YOUR HORSE BEFORE HE DIES
THE ART OF LIFE IS PASSING LOSSES ON.”
—Robert Frost (18741963)