Casting to Object[] allows compilation on Java 11.
This commit is contained in:
parent
43b7fe30ec
commit
6b9e6419fc
|
@ -1084,7 +1084,8 @@ public abstract class AbstractCollectionTest<E> extends AbstractObjectTest {
|
||||||
verify();
|
verify();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
array = getCollection().toArray(null);
|
// Casting to Object[] allows compilation on Java 11.
|
||||||
|
array = getCollection().toArray((Object[]) null);
|
||||||
fail("toArray(null) should raise NPE");
|
fail("toArray(null) should raise NPE");
|
||||||
} catch (final NullPointerException e) {
|
} catch (final NullPointerException e) {
|
||||||
// expected
|
// expected
|
||||||
|
|
Loading…
Reference in New Issue