Women in Technology

Hear us Roar

  Seven Low-Cost Ways to Improve Legacy Code
Subject:   final checks
Date:   2004-04-29 07:28:12
From:   simonharris1
Checkstyle does have a check to ensure you don't reassign the value of a parameter. This means you can avoid having to actually write final everywhere in your code but still have the benefits.
Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • final checks
    2004-05-02 06:49:11  Steve Peters [View]

    Neither does java have a check to make sure that you use Checkstyle on your code nor doesjava enforce this on all users of your classes. Adding finals to your code ensures that your code works no matter who how it is built.
  • final checks
    2004-04-29 16:19:35  Robert Simmons, Jr. | O'Reilly Author [View]

    There is absolutely zero negative impact to making extensive use of final. Therefore, its of zero cost to use it a lot. If I had a dollar for every bug that technique has caught, I could retire.

    Second of all, never hang your code base on any one tool. Its a really bad idea, especailly if you go to a company that doesnt use that tool and doesnt want to use it.