ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ConcurrentLinkedQueueTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ConcurrentLinkedQueueTest.java (file contents):
Revision 1.47 by jsr166, Fri Aug 4 03:30:21 2017 UTC vs.
Revision 1.52 by jsr166, Wed Jan 27 02:55:18 2021 UTC

# Line 25 | Line 25 | public class ConcurrentLinkedQueueTest e
25          class Implementation implements CollectionImplementation {
26              public Class<?> klazz() { return ConcurrentLinkedQueue.class; }
27              public Collection emptyCollection() { return new ConcurrentLinkedQueue(); }
28 <            public Object makeElement(int i) { return i; }
28 >            public Object makeElement(int i) { return JSR166TestCase.itemFor(i); }
29              public boolean isConcurrent() { return true; }
30              public boolean permitsNulls() { return false; }
31          }
# Line 35 | Line 35 | public class ConcurrentLinkedQueueTest e
35  
36      /**
37       * Returns a new queue of given size containing consecutive
38 <     * Integers 0 ... n - 1.
38 >     * Items 0 ... n - 1.
39       */
40 <    private static ConcurrentLinkedQueue<Integer> populatedQueue(int n) {
41 <        ConcurrentLinkedQueue<Integer> q = new ConcurrentLinkedQueue<>();
40 >    private static ConcurrentLinkedQueue<Item> populatedQueue(int n) {
41 >        ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
42          assertTrue(q.isEmpty());
43          for (int i = 0; i < n; ++i)
44 <            assertTrue(q.offer(new Integer(i)));
44 >            mustOffer(q, i);
45          assertFalse(q.isEmpty());
46 <        assertEquals(n, q.size());
47 <        assertEquals((Integer) 0, q.peek());
46 >        mustEqual(n, q.size());
47 >        mustEqual(0, q.peek());
48          return q;
49      }
50  
# Line 52 | Line 52 | public class ConcurrentLinkedQueueTest e
52       * new queue is empty
53       */
54      public void testConstructor1() {
55 <        assertEquals(0, new ConcurrentLinkedQueue().size());
55 >        mustEqual(0, new ConcurrentLinkedQueue<Item>().size());
56      }
57  
58      /**
# Line 60 | Line 60 | public class ConcurrentLinkedQueueTest e
60       */
61      public void testConstructor3() {
62          try {
63 <            new ConcurrentLinkedQueue((Collection)null);
63 >            new ConcurrentLinkedQueue<Item>((Collection<Item>)null);
64              shouldThrow();
65          } catch (NullPointerException success) {}
66      }
# Line 70 | Line 70 | public class ConcurrentLinkedQueueTest e
70       */
71      public void testConstructor4() {
72          try {
73 <            new ConcurrentLinkedQueue(Arrays.asList(new Integer[SIZE]));
73 >            new ConcurrentLinkedQueue<Item>(Arrays.asList(new Item[SIZE]));
74              shouldThrow();
75          } catch (NullPointerException success) {}
76      }
# Line 79 | Line 79 | public class ConcurrentLinkedQueueTest e
79       * Initializing from Collection with some null elements throws NPE
80       */
81      public void testConstructor5() {
82 <        Integer[] ints = new Integer[SIZE];
83 <        for (int i = 0; i < SIZE - 1; ++i)
84 <            ints[i] = new Integer(i);
82 >        Item[] items = new Item[2];
83 >        items[0] = zero;
84          try {
85 <            new ConcurrentLinkedQueue(Arrays.asList(ints));
85 >            new ConcurrentLinkedQueue<Item>(Arrays.asList(items));
86              shouldThrow();
87          } catch (NullPointerException success) {}
88      }
# Line 92 | Line 91 | public class ConcurrentLinkedQueueTest e
91       * Queue contains all elements of collection used to initialize
92       */
93      public void testConstructor6() {
94 <        Integer[] ints = new Integer[SIZE];
94 >        Item[] items = defaultItems;
95 >        ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>(Arrays.asList(items));
96          for (int i = 0; i < SIZE; ++i)
97 <            ints[i] = new Integer(i);
98 <        ConcurrentLinkedQueue q = new ConcurrentLinkedQueue(Arrays.asList(ints));
99 <        for (int i = 0; i < SIZE; ++i)
100 <            assertEquals(ints[i], q.poll());
97 >            mustEqual(items[i], q.poll());
98      }
99  
100      /**
101       * isEmpty is true before add, false after
102       */
103      public void testEmpty() {
104 <        ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
104 >        ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
105          assertTrue(q.isEmpty());
106          q.add(one);
107          assertFalse(q.isEmpty());
# Line 118 | Line 115 | public class ConcurrentLinkedQueueTest e
115       * size changes when elements added and removed
116       */
117      public void testSize() {
118 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
118 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
119          for (int i = 0; i < SIZE; ++i) {
120 <            assertEquals(SIZE - i, q.size());
120 >            mustEqual(SIZE - i, q.size());
121              q.remove();
122          }
123          for (int i = 0; i < SIZE; ++i) {
124 <            assertEquals(i, q.size());
125 <            q.add(new Integer(i));
124 >            mustEqual(i, q.size());
125 >            mustAdd(q, i);
126          }
127      }
128  
# Line 133 | Line 130 | public class ConcurrentLinkedQueueTest e
130       * offer(null) throws NPE
131       */
132      public void testOfferNull() {
133 <        ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
133 >        ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
134          try {
135              q.offer(null);
136              shouldThrow();
# Line 144 | Line 141 | public class ConcurrentLinkedQueueTest e
141       * add(null) throws NPE
142       */
143      public void testAddNull() {
144 <        ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
144 >        ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
145          try {
146              q.add(null);
147              shouldThrow();
# Line 155 | Line 152 | public class ConcurrentLinkedQueueTest e
152       * Offer returns true
153       */
154      public void testOffer() {
155 <        ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
155 >        ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
156          assertTrue(q.offer(zero));
157          assertTrue(q.offer(one));
158      }
# Line 164 | Line 161 | public class ConcurrentLinkedQueueTest e
161       * add returns true
162       */
163      public void testAdd() {
164 <        ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
164 >        ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
165          for (int i = 0; i < SIZE; ++i) {
166 <            assertEquals(i, q.size());
167 <            assertTrue(q.add(new Integer(i)));
166 >            mustEqual(i, q.size());
167 >            mustAdd(q, i);
168          }
169      }
170  
# Line 175 | Line 172 | public class ConcurrentLinkedQueueTest e
172       * addAll(null) throws NullPointerException
173       */
174      public void testAddAll1() {
175 <        ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
175 >        ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
176          try {
177              q.addAll(null);
178              shouldThrow();
# Line 186 | Line 183 | public class ConcurrentLinkedQueueTest e
183       * addAll(this) throws IllegalArgumentException
184       */
185      public void testAddAllSelf() {
186 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
186 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
187          try {
188              q.addAll(q);
189              shouldThrow();
# Line 197 | Line 194 | public class ConcurrentLinkedQueueTest e
194       * addAll of a collection with null elements throws NullPointerException
195       */
196      public void testAddAll2() {
197 <        ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
197 >        ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
198          try {
199 <            q.addAll(Arrays.asList(new Integer[SIZE]));
199 >            q.addAll(Arrays.asList(new Item[SIZE]));
200              shouldThrow();
201          } catch (NullPointerException success) {}
202      }
# Line 209 | Line 206 | public class ConcurrentLinkedQueueTest e
206       * possibly adding some elements
207       */
208      public void testAddAll3() {
209 <        ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
210 <        Integer[] ints = new Integer[SIZE];
211 <        for (int i = 0; i < SIZE - 1; ++i)
215 <            ints[i] = new Integer(i);
209 >        ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
210 >        Item[] items = new Item[2];
211 >        items[0] = zero;
212          try {
213 <            q.addAll(Arrays.asList(ints));
213 >            q.addAll(Arrays.asList(items));
214              shouldThrow();
215          } catch (NullPointerException success) {}
216      }
# Line 223 | Line 219 | public class ConcurrentLinkedQueueTest e
219       * Queue contains all elements, in traversal order, of successful addAll
220       */
221      public void testAddAll5() {
222 <        Integer[] empty = new Integer[0];
223 <        Integer[] ints = new Integer[SIZE];
224 <        for (int i = 0; i < SIZE; ++i)
229 <            ints[i] = new Integer(i);
230 <        ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
222 >        Item[] empty = new Item[0];
223 >        Item[] items = defaultItems;
224 >        ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
225          assertFalse(q.addAll(Arrays.asList(empty)));
226 <        assertTrue(q.addAll(Arrays.asList(ints)));
226 >        assertTrue(q.addAll(Arrays.asList(items)));
227          for (int i = 0; i < SIZE; ++i)
228 <            assertEquals(ints[i], q.poll());
228 >            mustEqual(items[i], q.poll());
229      }
230  
231      /**
232       * poll succeeds unless empty
233       */
234      public void testPoll() {
235 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
235 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
236          for (int i = 0; i < SIZE; ++i) {
237 <            assertEquals(i, q.poll());
237 >            mustEqual(i, q.poll());
238          }
239          assertNull(q.poll());
240      }
# Line 249 | Line 243 | public class ConcurrentLinkedQueueTest e
243       * peek returns next element, or null if empty
244       */
245      public void testPeek() {
246 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
246 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
247          for (int i = 0; i < SIZE; ++i) {
248 <            assertEquals(i, q.peek());
249 <            assertEquals(i, q.poll());
248 >            mustEqual(i, q.peek());
249 >            mustEqual(i, q.poll());
250              assertTrue(q.peek() == null ||
251                         !q.peek().equals(i));
252          }
# Line 263 | Line 257 | public class ConcurrentLinkedQueueTest e
257       * element returns next element, or throws NSEE if empty
258       */
259      public void testElement() {
260 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
260 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
261          for (int i = 0; i < SIZE; ++i) {
262 <            assertEquals(i, q.element());
263 <            assertEquals(i, q.poll());
262 >            mustEqual(i, q.element());
263 >            mustEqual(i, q.poll());
264          }
265          try {
266              q.element();
# Line 278 | Line 272 | public class ConcurrentLinkedQueueTest e
272       * remove removes next element, or throws NSEE if empty
273       */
274      public void testRemove() {
275 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
275 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
276          for (int i = 0; i < SIZE; ++i) {
277 <            assertEquals(i, q.remove());
277 >            mustEqual(i, q.remove());
278          }
279          try {
280              q.remove();
# Line 292 | Line 286 | public class ConcurrentLinkedQueueTest e
286       * remove(x) removes x and returns true if present
287       */
288      public void testRemoveElement() {
289 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
289 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
290          for (int i = 1; i < SIZE; i += 2) {
291 <            assertTrue(q.contains(i));
292 <            assertTrue(q.remove(i));
293 <            assertFalse(q.contains(i));
294 <            assertTrue(q.contains(i - 1));
291 >            mustContain(q, i);
292 >            mustRemove(q, i);
293 >            mustNotContain(q, i);
294 >            mustContain(q, i - 1);
295          }
296          for (int i = 0; i < SIZE; i += 2) {
297 <            assertTrue(q.contains(i));
298 <            assertTrue(q.remove(i));
299 <            assertFalse(q.contains(i));
300 <            assertFalse(q.remove(i + 1));
301 <            assertFalse(q.contains(i + 1));
297 >            mustContain(q, i);
298 >            mustRemove(q, i);
299 >            mustNotContain(q, i);
300 >            mustNotRemove(q, i + 1);
301 >            mustNotContain(q, i + 1);
302          }
303          assertTrue(q.isEmpty());
304      }
# Line 313 | Line 307 | public class ConcurrentLinkedQueueTest e
307       * contains(x) reports true when elements added but not yet removed
308       */
309      public void testContains() {
310 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
310 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
311          for (int i = 0; i < SIZE; ++i) {
312 <            assertTrue(q.contains(new Integer(i)));
312 >            mustContain(q, i);
313              q.poll();
314 <            assertFalse(q.contains(new Integer(i)));
314 >            mustNotContain(q, i);
315          }
316      }
317  
# Line 325 | Line 319 | public class ConcurrentLinkedQueueTest e
319       * clear removes all elements
320       */
321      public void testClear() {
322 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
322 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
323          q.clear();
324          assertTrue(q.isEmpty());
325 <        assertEquals(0, q.size());
325 >        mustEqual(0, q.size());
326          q.add(one);
327          assertFalse(q.isEmpty());
328          q.clear();
# Line 339 | Line 333 | public class ConcurrentLinkedQueueTest e
333       * containsAll(c) is true when c contains a subset of elements
334       */
335      public void testContainsAll() {
336 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
337 <        ConcurrentLinkedQueue p = new ConcurrentLinkedQueue();
336 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
337 >        ConcurrentLinkedQueue<Item> p = new ConcurrentLinkedQueue<>();
338          for (int i = 0; i < SIZE; ++i) {
339              assertTrue(q.containsAll(p));
340              assertFalse(p.containsAll(q));
341 <            p.add(new Integer(i));
341 >            mustAdd(p, i);
342          }
343          assertTrue(p.containsAll(q));
344      }
# Line 353 | Line 347 | public class ConcurrentLinkedQueueTest e
347       * retainAll(c) retains only those elements of c and reports true if change
348       */
349      public void testRetainAll() {
350 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
351 <        ConcurrentLinkedQueue p = populatedQueue(SIZE);
350 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
351 >        ConcurrentLinkedQueue<Item> p = populatedQueue(SIZE);
352          for (int i = 0; i < SIZE; ++i) {
353              boolean changed = q.retainAll(p);
354              if (i == 0)
# Line 363 | Line 357 | public class ConcurrentLinkedQueueTest e
357                  assertTrue(changed);
358  
359              assertTrue(q.containsAll(p));
360 <            assertEquals(SIZE - i, q.size());
360 >            mustEqual(SIZE - i, q.size());
361              p.remove();
362          }
363      }
# Line 373 | Line 367 | public class ConcurrentLinkedQueueTest e
367       */
368      public void testRemoveAll() {
369          for (int i = 1; i < SIZE; ++i) {
370 <            ConcurrentLinkedQueue q = populatedQueue(SIZE);
371 <            ConcurrentLinkedQueue p = populatedQueue(i);
370 >            ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
371 >            ConcurrentLinkedQueue<Item> p = populatedQueue(i);
372              assertTrue(q.removeAll(p));
373 <            assertEquals(SIZE - i, q.size());
373 >            mustEqual(SIZE - i, q.size());
374              for (int j = 0; j < i; ++j) {
375 <                Integer x = (Integer)(p.remove());
375 >                Item x = p.remove();
376                  assertFalse(q.contains(x));
377              }
378          }
# Line 388 | Line 382 | public class ConcurrentLinkedQueueTest e
382       * toArray contains all elements in FIFO order
383       */
384      public void testToArray() {
385 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
386 <        Object[] o = q.toArray();
387 <        for (int i = 0; i < o.length; i++)
388 <            assertSame(o[i], q.poll());
385 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
386 >        Object[] a = q.toArray();
387 >        assertSame(Object[].class, a.getClass());
388 >        for (Object o : a)
389 >            assertSame(o, q.poll());
390 >        assertTrue(q.isEmpty());
391      }
392  
393      /**
394       * toArray(a) contains all elements in FIFO order
395       */
396      public void testToArray2() {
397 <        ConcurrentLinkedQueue<Integer> q = populatedQueue(SIZE);
398 <        Integer[] ints = new Integer[SIZE];
399 <        Integer[] array = q.toArray(ints);
400 <        assertSame(ints, array);
401 <        for (int i = 0; i < ints.length; i++)
402 <            assertSame(ints[i], q.poll());
397 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
398 >        Item[] items = new Item[SIZE];
399 >        Item[] array = q.toArray(items);
400 >        assertSame(items, array);
401 >        for (Item o : items)
402 >            assertSame(o, q.poll());
403 >        assertTrue(q.isEmpty());
404      }
405  
406      /**
407       * toArray(null) throws NullPointerException
408       */
409      public void testToArray_NullArg() {
410 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
410 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
411          try {
412 <            q.toArray(null);
412 >            q.toArray((Object[])null);
413              shouldThrow();
414          } catch (NullPointerException success) {}
415      }
# Line 420 | Line 417 | public class ConcurrentLinkedQueueTest e
417      /**
418       * toArray(incompatible array type) throws ArrayStoreException
419       */
420 <    public void testToArray1_BadArg() {
421 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
420 >    @SuppressWarnings("CollectionToArraySafeParameter")
421 >    public void testToArray_incompatibleArrayType() {
422 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
423          try {
424              q.toArray(new String[10]);
425              shouldThrow();
# Line 432 | Line 430 | public class ConcurrentLinkedQueueTest e
430       * iterator iterates through all elements
431       */
432      public void testIterator() {
433 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
434 <        Iterator it = q.iterator();
433 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
434 >        Iterator<? extends Item> it = q.iterator();
435          int i;
436          for (i = 0; it.hasNext(); i++)
437 <            assertTrue(q.contains(it.next()));
438 <        assertEquals(i, SIZE);
437 >            mustContain(q, it.next());
438 >        mustEqual(i, SIZE);
439          assertIteratorExhausted(it);
440      }
441  
# Line 445 | Line 443 | public class ConcurrentLinkedQueueTest e
443       * iterator of empty collection has no elements
444       */
445      public void testEmptyIterator() {
446 <        assertIteratorExhausted(new ConcurrentLinkedQueue().iterator());
446 >        assertIteratorExhausted(new ConcurrentLinkedQueue<>().iterator());
447      }
448  
449      /**
450       * iterator ordering is FIFO
451       */
452      public void testIteratorOrdering() {
453 <        final ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
453 >        final ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
454          q.add(one);
455          q.add(two);
456          q.add(three);
457  
458          int k = 0;
459 <        for (Iterator it = q.iterator(); it.hasNext();) {
460 <            assertEquals(++k, it.next());
459 >        for (Iterator<? extends Item> it = q.iterator(); it.hasNext();) {
460 >            mustEqual(++k, it.next());
461          }
462  
463 <        assertEquals(3, k);
463 >        mustEqual(3, k);
464      }
465  
466      /**
467       * Modifications do not cause iterators to fail
468       */
469      public void testWeaklyConsistentIteration() {
470 <        final ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
470 >        final ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
471          q.add(one);
472          q.add(two);
473          q.add(three);
474  
475 <        for (Iterator it = q.iterator(); it.hasNext();) {
475 >        for (Iterator<? extends Item> it = q.iterator(); it.hasNext();) {
476              q.remove();
477              it.next();
478          }
479  
480 <        assertEquals("queue should be empty again", 0, q.size());
480 >        mustEqual(0, q.size());
481      }
482  
483      /**
484       * iterator.remove removes current element
485       */
486      public void testIteratorRemove() {
487 <        final ConcurrentLinkedQueue q = new ConcurrentLinkedQueue();
487 >        final ConcurrentLinkedQueue<Item> q = new ConcurrentLinkedQueue<>();
488          q.add(one);
489          q.add(two);
490          q.add(three);
491 <        Iterator it = q.iterator();
491 >        Iterator<? extends Item> it = q.iterator();
492          it.next();
493          it.remove();
494          it = q.iterator();
# Line 503 | Line 501 | public class ConcurrentLinkedQueueTest e
501       * toString contains toStrings of elements
502       */
503      public void testToString() {
504 <        ConcurrentLinkedQueue q = populatedQueue(SIZE);
504 >        ConcurrentLinkedQueue<Item> q = populatedQueue(SIZE);
505          String s = q.toString();
506          for (int i = 0; i < SIZE; ++i) {
507              assertTrue(s.contains(String.valueOf(i)));
# Line 514 | Line 512 | public class ConcurrentLinkedQueueTest e
512       * A deserialized/reserialized queue has same elements in same order
513       */
514      public void testSerialization() throws Exception {
515 <        Queue x = populatedQueue(SIZE);
516 <        Queue y = serialClone(x);
515 >        Queue<Item> x = populatedQueue(SIZE);
516 >        Queue<Item> y = serialClone(x);
517  
518          assertNotSame(x, y);
519 <        assertEquals(x.size(), y.size());
520 <        assertEquals(x.toString(), y.toString());
519 >        mustEqual(x.size(), y.size());
520 >        mustEqual(x.toString(), y.toString());
521          assertTrue(Arrays.equals(x.toArray(), y.toArray()));
522          while (!x.isEmpty()) {
523              assertFalse(y.isEmpty());
524 <            assertEquals(x.remove(), y.remove());
524 >            mustEqual(x.remove(), y.remove());
525          }
526          assertTrue(y.isEmpty());
527      }
# Line 533 | Line 531 | public class ConcurrentLinkedQueueTest e
531       */
532      public void testNeverContainsNull() {
533          Collection<?>[] qs = {
534 <            new ConcurrentLinkedQueue<Object>(),
534 >            new ConcurrentLinkedQueue<>(),
535              populatedQueue(2),
536          };
537  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines