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.120 by dl, Thu Jun 2 13:16:27 2016 UTC vs.
Revision 1.121 by jsr166, Sat Dec 24 19:32:07 2016 UTC

# Line 13 | Line 13 | import java.util.AbstractQueue;
13   import java.util.Collection;
14   import java.util.Collections;
15   import java.util.Iterator;
16 + import java.util.Objects;
17   import java.util.Spliterator;
18   import java.util.Spliterators;
19   import java.util.concurrent.locks.LockSupport;
# Line 1083 | Line 1084 | public class SynchronousQueue<E> extends
1084       * @throws IllegalArgumentException      {@inheritDoc}
1085       */
1086      public int drainTo(Collection<? super E> c) {
1087 <        if (c == null)
1087 <            throw new NullPointerException();
1087 >        Objects.requireNonNull(c);
1088          if (c == this)
1089              throw new IllegalArgumentException();
1090          int n = 0;
# Line 1102 | Line 1102 | public class SynchronousQueue<E> extends
1102       * @throws IllegalArgumentException      {@inheritDoc}
1103       */
1104      public int drainTo(Collection<? super E> c, int maxElements) {
1105 <        if (c == null)
1106 <            throw new NullPointerException();
1105 >        Objects.requireNonNull(c);
1106          if (c == this)
1107              throw new IllegalArgumentException();
1108          int n = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines