logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: [v2] final keyword
Date Thu, 10 Jan 2013 21:39:16 GMT
I guess I should have replied.

My attitude is "I don't care but don't expect me to always do it".  Mainly, this is because
I have no idea what, if any, benefit there is to declaring a variable that is local to a method
as final.  They don't affect thread safety and, as far as I am aware, don't improve the performance
of the code.  If you can find something that shows significant benefit then maybe I'll get
in the habit of doing it too.

As far as class variables, those I have a much stronger opinion about. They should be declared
final whenever possible.  

Ralph




On Jan 10, 2013, at 12:15 PM, Gary Gregory wrote:

> Since there is no negative feedback, I'll add final keywords.
> 
> Gary
> 
> 
> On Tue, Oct 9, 2012 at 9:08 AM, Gary Gregory <garydgregory@gmail.com> wrote:
> Hi All:
> 
> The final keyword in trunk: sometimes it is used, sometimes not. I propose we use it
all over consistently.
> 
> Gary
> 
> -- 
> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com 
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
> 
> 
> 
> -- 
> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com 
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory


Mime
View raw message