245 |
|
shouldThrow(); |
246 |
|
} catch (NullPointerException success) {} |
247 |
|
} |
248 |
+ |
|
249 |
|
/** |
250 |
|
* addAll of a collection with any null elements throws NPE after |
251 |
|
* possibly adding some elements |
452 |
|
final PriorityBlockingQueue q = new PriorityBlockingQueue(2); |
453 |
|
Thread t = new Thread(new CheckedRunnable() { |
454 |
|
public void realRun() throws InterruptedException { |
454 |
– |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
455 |
– |
assertSame(zero, q.poll(MEDIUM_DELAY_MS, MILLISECONDS)); |
455 |
|
try { |
456 |
+ |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
457 |
+ |
assertSame(zero, q.poll(MEDIUM_DELAY_MS, MILLISECONDS)); |
458 |
|
q.poll(LONG_DELAY_MS, MILLISECONDS); |
459 |
|
shouldThrow(); |
460 |
|
} catch (InterruptedException success) {} |