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

Comparing jsr166/src/main/java/util/concurrent/SynchronousQueue.java (file contents):
Revision 1.101 by jsr166, Thu Aug 8 14:14:29 2013 UTC vs.
Revision 1.102 by jsr166, Thu Aug 8 14:30:15 2013 UTC

# Line 1037 | Line 1037 | public class SynchronousQueue<E> extends
1037       *
1038       * @return an empty iterator
1039       */
1040    @SuppressWarnings("unchecked")
1040      public Iterator<E> iterator() {
1041 <        return (Iterator<E>) EmptyIterator.EMPTY_ITERATOR;
1043 <    }
1044 <
1045 <    // Replicated from a previous version of Collections
1046 <    private static class EmptyIterator<E> implements Iterator<E> {
1047 <        static final EmptyIterator<Object> EMPTY_ITERATOR
1048 <            = new EmptyIterator<Object>();
1049 <
1050 <        public boolean hasNext() { return false; }
1051 <        public E next() { throw new NoSuchElementException(); }
1052 <        public void remove() { throw new IllegalStateException(); }
1041 >        return Collections.emptyIterator();
1042      }
1043  
1044      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines