198 |
|
final SynchronousQueue q = new SynchronousQueue(); |
199 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
200 |
|
public void realRun() throws InterruptedException { |
201 |
< |
threadAssertFalse(q.offer(new Object(), SHORT_DELAY_MS, MILLISECONDS)); |
201 |
> |
assertFalse(q.offer(new Object(), SHORT_DELAY_MS, MILLISECONDS)); |
202 |
|
q.offer(new Object(), LONG_DELAY_MS, MILLISECONDS); |
203 |
|
}}); |
204 |
|
|
524 |
|
* toArray(null) throws NPE |
525 |
|
*/ |
526 |
|
public void testToArray_BadArg() { |
527 |
+ |
SynchronousQueue q = new SynchronousQueue(); |
528 |
|
try { |
528 |
– |
SynchronousQueue q = new SynchronousQueue(); |
529 |
|
Object o[] = q.toArray(null); |
530 |
|
shouldThrow(); |
531 |
|
} catch (NullPointerException success) {} |