hmm,

didn't find mention of "this" usage in this doc

maybe i was not clear so trying to be a bit more: updating code to use
"final" is IMO a nice update. The update i don't get is why replacing
"foo()" by "this.foo()". If the call is ambiguous it is a bad practice
and if it is not it makes code a bit less readable IMO

wdyt?

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2012/12/11 AndyG <andy.gumbre...@orprovision.com>:
> Here is a really good write up that I subscribe to that in addition to the
> 'Final fields' section has some really good links to other 'field' related
> resources.
>
> http://www.ibm.com/developerworks/java/library/j-jtp1029/index.html
>
> I have also based my use of final fields on the exposure of literally
> hundreds of bugs discovered over many years. You may be surprised to see how
> many subtle (yet extremely difficult to find) threading issues can be
> resolved by using final fields.
>
> If I have my way I would prefer a 'mutable' keyword, with the default being
> 'immutable' (final) ;-).
>
> The JIT compiler also offers optimizations on final fields over mutable
> ones.
>
> Andy.
>
>
>
> --
> View this message in context: 
> http://openejb.979440.n4.nabble.com/Fwd-svn-commit-r1420061-in-openejb-trunk-openejb-container-openejb-core-src-main-java-org-apache-opea-tp4659400p4659402.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Reply via email to