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.34 by dl, Tue Dec 9 21:43:57 2003 UTC vs.
Revision 1.35 by dl, Tue Dec 23 19:38:09 2003 UTC

# Line 594 | Line 594 | public class ConcurrentHashMap<K, V> ext
594  
595      // inherit Map javadoc
596      public boolean isEmpty() {
597 +        final Segment[] segments = this.segments;
598          /*
599           * We need to keep track of per-segment modCounts to avoid ABA
600           * problems in which an element in one segment was added and
# Line 626 | Line 627 | public class ConcurrentHashMap<K, V> ext
627  
628      // inherit Map javadoc
629      public int size() {
630 +        final Segment[] segments = this.segments;
631          int[] mc = new int[segments.length];
632          for (;;) {
633              long sum = 0;
# Line 699 | Line 701 | public class ConcurrentHashMap<K, V> ext
701          if (value == null)
702              throw new NullPointerException();
703  
704 +        final Segment[] segments = this.segments;
705          int[] mc = new int[segments.length];
706          for (;;) {
707              int sum = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines