Java Code Examples for java.util.concurrent.LinkedTransferQueue#addAll()
The following examples show how to use
java.util.concurrent.LinkedTransferQueue#addAll() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LinkedTransferQueueTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * addAll(this) throws IllegalArgumentException */ public void testAddAllSelf() { LinkedTransferQueue q = populatedQueue(SIZE); try { q.addAll(q); shouldThrow(); } catch (IllegalArgumentException success) {} }
Example 2
Source File: LinkedTransferQueueTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * addAll of a collection with any null elements throws * NullPointerException after possibly adding some elements */ public void testAddAll3() { LinkedTransferQueue q = new LinkedTransferQueue(); Integer[] ints = new Integer[SIZE]; for (int i = 0; i < SIZE - 1; ++i) ints[i] = i; try { q.addAll(Arrays.asList(ints)); shouldThrow(); } catch (NullPointerException success) {} }
Example 3
Source File: LinkedTransferQueueTest.java From j2objc with Apache License 2.0 | 5 votes |
/** * addAll(this) throws IllegalArgumentException */ public void testAddAllSelf() { LinkedTransferQueue q = populatedQueue(SIZE); try { q.addAll(q); shouldThrow(); } catch (IllegalArgumentException success) {} }
Example 4
Source File: LinkedTransferQueueTest.java From j2objc with Apache License 2.0 | 5 votes |
/** * addAll of a collection with any null elements throws * NullPointerException after possibly adding some elements */ public void testAddAll3() { LinkedTransferQueue q = new LinkedTransferQueue(); Integer[] ints = new Integer[SIZE]; for (int i = 0; i < SIZE - 1; ++i) ints[i] = i; try { q.addAll(Arrays.asList(ints)); shouldThrow(); } catch (NullPointerException success) {} }