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.66 by jsr166, Sun May 28 23:36:29 2006 UTC vs.
Revision 1.67 by jsr166, Wed Aug 8 16:48:48 2007 UTC

# Line 991 | Line 991 | public class SynchronousQueue<E> extends
991          return null;
992      }
993  
994    static class EmptyIterator<E> implements Iterator<E> {
995        public boolean hasNext() {
996            return false;
997        }
998        public E next() {
999            throw new NoSuchElementException();
1000        }
1001        public void remove() {
1002            throw new IllegalStateException();
1003        }
1004    }
1005
994      /**
995       * Returns an empty iterator in which <tt>hasNext</tt> always returns
996       * <tt>false</tt>.
# Line 1010 | Line 998 | public class SynchronousQueue<E> extends
998       * @return an empty iterator
999       */
1000      public Iterator<E> iterator() {
1001 <        return new EmptyIterator<E>();
1001 >        return Collections.emptyIterator();
1002      }
1003  
1004      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines