Rename Method - Take Care

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:

    The only sure way of avoiding these evils [vanity and boasting] is never to speak of yourself at all. But when, historically, you are obliged to mention yourself, take care not to drop one single word that can directly or indirectly be construed as fishing for applause.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)

    General McLaidlaw: Lena will never marry. She’s not the marrying sort. I see no reason to worry. There’s enough to care for her for the rest of her life.
    Mrs. McLaidlaw: I suppose you’re right, dear. I’m afraid she is rather spinsterish.
    General McLaidlaw: What’s wrong with that. The old maid’s a respectable institution. All women are not alike. Lena has intellect and a fine solid character.
    Samson Raphaelson (1896–1983)