On Tue, Nov 26, 2013 at 1:40 PM, Emmanuel Bourg <ebo...@apache.org> wrote:

> Le 26/11/2013 19:18, Gary Gregory a écrit :
>
> > I disagree, final everywhere is a good thing, please see
> > http://garygregory.wordpress.com/2013/01/26/the-final-kiss-in-java/
>
> Well, I guess we agree to disagree then :) Final everywhere is absurd
> imho, there are many cases where it's useless and increase the verbosity
> of the code, for example:
>
>     public ImageReadException(final String message) {
>         super(message);
>     }
>

Au contraire, final says that the reference to message is guaranteed to be
unchanged.

It is obvious in a one liner such as this one, but consistency is kind IMO.
When I see method after method that declare params as final (read only), I
can turn on my radar when I see one declared as read-write (by not using
final).

Gary


>
> Emmanuel Bourg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to