Casting to Object[] allows compilation on Java 11.

This commit is contained in:
Gary Gregory 2018-10-28 08:59:29 -06:00
parent 43b7fe30ec
commit 6b9e6419fc
1 changed files with 2 additions and 1 deletions

View File

@ -1084,7 +1084,8 @@ public abstract class AbstractCollectionTest<E> extends AbstractObjectTest {
verify();
try {
array = getCollection().toArray(null);
// Casting to Object[] allows compilation on Java 11.
array = getCollection().toArray((Object[]) null);
fail("toArray(null) should raise NPE");
} catch (final NullPointerException e) {
// expected