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