# | Line 1083 | Line 1083 | public class SynchronousQueue<E> extends | |
---|---|---|
1083 | if (c == this) | |
1084 | throw new IllegalArgumentException(); | |
1085 | int n = 0; | |
1086 | < | E e; |
1087 | < | while ( (e = poll()) != null) { |
1086 | > | for (E e; (e = poll()) != null;) { |
1087 | c.add(e); | |
1088 | ++n; | |
1089 | } | |
# | Line 1103 | Line 1102 | public class SynchronousQueue<E> extends | |
1102 | if (c == this) | |
1103 | throw new IllegalArgumentException(); | |
1104 | int n = 0; | |
1105 | < | E e; |
1107 | < | while (n < maxElements && (e = poll()) != null) { |
1105 | > | for (E e; n < maxElements && (e = poll()) != null;) { |
1106 | c.add(e); | |
1107 | ++n; | |
1108 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |