ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java (file contents):
Revision 1.82 by jsr166, Mon Aug 22 03:05:49 2005 UTC vs.
Revision 1.83 by jsr166, Mon Aug 22 03:42:10 2005 UTC

# Line 1126 | Line 1126 | public class ConcurrentHashMap<K, V> ext
1126       * Custom Entry class used by EntryIterator.next(), that relays
1127       * setValue changes to the underlying map.
1128       */
1129 <    static final class WriteThroughEntry<K,V>
1129 >    final class WriteThroughEntry
1130          extends AbstractMap.SimpleEntry<K,V>
1131      {
1132 <        private final ConcurrentHashMap<K,V> map;
1133 <        WriteThroughEntry(ConcurrentHashMap map, K k, V v) {
1132 >        WriteThroughEntry(K k, V v) {
1133              super(k,v);
1135            this.map = map;
1134          }
1135  
1136          /**
# Line 1147 | Line 1145 | public class ConcurrentHashMap<K, V> ext
1145          public V setValue(V value) {
1146              if (value == null) throw new NullPointerException();
1147              V v = super.setValue(value);
1148 <            map.put(getKey(), value);
1148 >            ConcurrentHashMap.this.put(getKey(), value);
1149              return v;
1150          }
1151      }
# Line 1158 | Line 1156 | public class ConcurrentHashMap<K, V> ext
1156      {
1157          public Map.Entry<K,V> next() {
1158              HashEntry<K,V> e = super.nextEntry();
1159 <            return new WriteThroughEntry<K,V>(ConcurrentHashMap.this,
1162 <                                              e.key, e.value);
1159 >            return new WriteThroughEntry(e.key, e.value);
1160          }
1161      }
1162  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines