Hi,
So I was looking at the source code for DateTime and I noticed that the
fields in BaseDateTime are not final. According to my understanding of the
Java Memory Model for an object to be (strictly) immutable, all of its
fields must be final. An effectively immutable object on the other hand
needs to be safely published, which there is no guarantee that DateTime
objects are. The fact that one cannot change the internal state after
construction does not mean that a value is unique accross threads. The Java
Concurrency In Practice book (ch. 3) by Brian Goetz explains these things
pretty well.
BR,
-FD
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest