Re: Why variables that we don't modify should be final?
Chris Morris <[email protected]> Tue, 25 May 2010 16:25:10 -0500
| Newsgroups | gmane.comp.programming.refactoring |
|---|---|
| Message-ID | <[email protected]> |
Personally, I'd ignore that - I think keeping the classes modifiable is a better long term plan for maintenance and perhaps testing needs. IIRC, there's a performance advantage, but these days not much of one, unless you have some strict needs. On Tue, May 25, 2010 at 2:56 PM, Alberto Ivo <[email protected]> wrote: > > > Hello, > > I just passed PMD in my Java code.. and a lot of variables the PMD says > that > should be final.. just because I do not modify. > I know that, like this, it's safer because I'm sure that it wil be not > modified ever... > But, besides that, is there another advantage? like performance or anything > else? > > Thanks in advance. > Ivo > > [Non-text portions of this message have been removed] > > > -- Chris http://improvingenterprises.com http://clabs.org [Non-text portions of this message have been removed] ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/refactoring/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/refactoring/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/