ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166e/extra/ReadMostlyVector.java
(Generate patch)

Comparing jsr166/src/jsr166e/extra/ReadMostlyVector.java (file contents):
Revision 1.16 by jsr166, Sat Dec 31 05:35:16 2011 UTC vs.
Revision 1.17 by jsr166, Sat Dec 31 05:38:24 2011 UTC

# Line 667 | Line 667 | public class ReadMostlyVector<E>
667      }
668  
669      public int indexOf(Object o) {
670 <        final SequenceLock lock = this.lock;
671 <        for (;;) {
672 <            long seq = lock.awaitAvailability();
673 <            Object[] items = array;
674 <            int n = count;
675 <            if (n <= items.length) {
676 <                for (int i = 0; i < n; ++i) {
677 <                    Object e = items[i];
678 <                    if (lock.getSequence() != seq) {
679 <                        lock.lock();
680 <                        try {
681 <                            return rawIndexOf(o, 0, count);
682 <                        } finally {
683 <                            lock.unlock();
684 <                        }
685 <                    }
686 <                    else if ((o == null) ? e == null : o.equals(e))
687 <                        return i;
688 <                }
689 <                return -1;
690 <            }
691 <        }
670 >        return indexOf(o, 0);
671      }
672  
673      public boolean isEmpty() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines