The performance impact of this might be severe when deserializing object
graphs with lots of final fields (and we recommend using final fields wherever
possible.) And, I'm a little unclear on the approach here. If the goal is to
provide a happens-before edge between deserializing an object graph and
reading a final field in that object graph, I don't see how this does it,
since the reads of those field will be nonvolatile reads. So this seems like
it has a big performance cost and doesn't fully solve the problem.
Can you outline the strategy here?
On 11/22/2010 8:52 AM, Alan Bateman wrote:
This is a patch to default deserialization so that it uses volatile-write when
setting final fields:
http://cr.openjdk.java.net/~alanb/6647361/webrev/
Thanks,
Alan.