6625725: (coll) modCount should not be volatile

Reviewed-by: dholmes
This commit is contained in:
Martin Buchholz 2008-03-10 23:23:48 -07:00
parent 95c7559bd3
commit 5d9d5e3e88
3 changed files with 3 additions and 3 deletions

View File

@ -173,7 +173,7 @@ public class HashMap<K,V>
* rehash). This field is used to make iterators on Collection-views of
* the HashMap fail-fast. (See ConcurrentModificationException).
*/
transient volatile int modCount;
transient int modCount;
/**
* Constructs an empty <tt>HashMap</tt> with the specified initial

View File

@ -173,7 +173,7 @@ public class IdentityHashMap<K,V>
/**
* The number of modifications, to support fast-fail iterators
*/
private transient volatile int modCount;
private transient int modCount;
/**
* The next size value at which to resize (capacity * load factor).

View File

@ -182,7 +182,7 @@ public class WeakHashMap<K,V>
*
* @see ConcurrentModificationException
*/
volatile int modCount;
int modCount;
@SuppressWarnings("unchecked")
private Entry<K,V>[] newTable(int n) {