643 |
|
} |
644 |
|
|
645 |
|
/** |
646 |
< |
* toArray(null) throws NPE |
646 |
> |
* toArray(null) throws NullPointerException |
647 |
|
*/ |
648 |
< |
public void testToArray_BadArg() { |
648 |
> |
public void testToArray_NullArg() { |
649 |
|
ArrayDeque l = new ArrayDeque(); |
650 |
|
l.add(new Object()); |
651 |
|
try { |
652 |
< |
Object o[] = l.toArray(null); |
652 |
> |
l.toArray(null); |
653 |
|
shouldThrow(); |
654 |
|
} catch (NullPointerException success) {} |
655 |
|
} |
656 |
|
|
657 |
|
/** |
658 |
< |
* toArray with incompatible array type throws CCE |
658 |
> |
* toArray(incompatible array type) throws ArrayStoreException |
659 |
|
*/ |
660 |
|
public void testToArray1_BadArg() { |
661 |
|
ArrayDeque l = new ArrayDeque(); |
662 |
|
l.add(new Integer(5)); |
663 |
|
try { |
664 |
< |
Object o[] = l.toArray(new String[10]); |
664 |
> |
l.toArray(new String[10]); |
665 |
|
shouldThrow(); |
666 |
|
} catch (ArrayStoreException success) {} |
667 |
|
} |