Unmodifiable view of modified features.
It is imperative that the user manually synchronize on the
map when iterating over any of its collection views:
Set s = diff.modified2.keySet(); // Needn't be in synchronized block
...
synchronized(diff) { // Synchronizing on diff, not diff.modified2 or s!
Iterator i = s.iterator(); // Must be in synchronized block
while (i.hasNext())
foo(i.next());
}
Failure to follow this advice may result in non-deterministic behavior.
The returned map will be serializable if the specified map is
serializable.
|