628 |
|
} |
629 |
|
|
630 |
|
/** |
631 |
< |
* toArray(null) throws NPE |
631 |
> |
* toArray(null) throws NullPointerException |
632 |
|
*/ |
633 |
< |
public void testToArray_BadArg() { |
633 |
> |
public void testToArray_NullArg() { |
634 |
|
ArrayBlockingQueue q = populatedQueue(SIZE); |
635 |
|
try { |
636 |
< |
Object o[] = q.toArray(null); |
636 |
> |
q.toArray(null); |
637 |
|
shouldThrow(); |
638 |
|
} catch (NullPointerException success) {} |
639 |
|
} |
640 |
|
|
641 |
|
/** |
642 |
< |
* toArray with incompatible array type throws CCE |
642 |
> |
* toArray(incompatible array type) throws ArrayStoreException |
643 |
|
*/ |
644 |
|
public void testToArray1_BadArg() { |
645 |
|
ArrayBlockingQueue q = populatedQueue(SIZE); |
646 |
|
try { |
647 |
< |
Object o[] = q.toArray(new String[10]); |
647 |
> |
q.toArray(new String[10]); |
648 |
|
shouldThrow(); |
649 |
|
} catch (ArrayStoreException success) {} |
650 |
|
} |