changeset 42:0487ce0465d6

6625725: (coll) modCount should not be volatile Reviewed-by: dholmes
author martin
date Mon, 10 Mar 2008 23:23:48 -0700
parents f330b7834288
children 278e769f9123
files src/share/classes/java/util/HashMap.java src/share/classes/java/util/IdentityHashMap.java src/share/classes/java/util/WeakHashMap.java
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/HashMap.java	Mon Mar 10 23:23:48 2008 -0700
+++ b/src/share/classes/java/util/HashMap.java	Mon Mar 10 23:23:48 2008 -0700
@@ -173,7 +173,7 @@
      * 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
--- a/src/share/classes/java/util/IdentityHashMap.java	Mon Mar 10 23:23:48 2008 -0700
+++ b/src/share/classes/java/util/IdentityHashMap.java	Mon Mar 10 23:23:48 2008 -0700
@@ -173,7 +173,7 @@
     /**
      * 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).
--- a/src/share/classes/java/util/WeakHashMap.java	Mon Mar 10 23:23:48 2008 -0700
+++ b/src/share/classes/java/util/WeakHashMap.java	Mon Mar 10 23:23:48 2008 -0700
@@ -182,7 +182,7 @@
      *
      * @see ConcurrentModificationException
      */
-    volatile int modCount;
+    int modCount;
 
     @SuppressWarnings("unchecked")
     private Entry<K,V>[] newTable(int n) {