Unless I've misunderstood it, ConcurrentHashMap from JSR166 is an example
of real life code that can fail if the reference to the outer class is not
final. Consider in particular the keySet() method, which potentially (and
intentionally, for sure) returns an instance of an inner class via a data
race. The inner class refers to its outer class in some of its methods.
Sylvia.
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:07 EDT