602 |
|
} |
603 |
|
|
604 |
|
/** |
605 |
< |
* toArray(null) throws NPE |
605 |
> |
* toArray(null) throws NullPointerException |
606 |
|
*/ |
607 |
< |
public void testToArray_BadArg() { |
607 |
> |
public void testToArray_NullArg() { |
608 |
|
PriorityBlockingQueue q = populatedQueue(SIZE); |
609 |
|
try { |
610 |
< |
Object o[] = q.toArray(null); |
610 |
> |
q.toArray(null); |
611 |
|
shouldThrow(); |
612 |
|
} catch (NullPointerException success) {} |
613 |
|
} |
614 |
|
|
615 |
|
/** |
616 |
< |
* toArray with incompatible array type throws CCE |
616 |
> |
* toArray(incompatible array type) throws ArrayStoreException |
617 |
|
*/ |
618 |
|
public void testToArray1_BadArg() { |
619 |
|
PriorityBlockingQueue q = populatedQueue(SIZE); |
620 |
|
try { |
621 |
< |
Object o[] = q.toArray(new String[10]); |
621 |
> |
q.toArray(new String[10]); |
622 |
|
shouldThrow(); |
623 |
|
} catch (ArrayStoreException success) {} |
624 |
|
} |