diff -r 72b6d674bde2 -r 76519338df34 test/jdk/java/lang/invoke/SpreadCollectTest.java --- a/test/jdk/java/lang/invoke/SpreadCollectTest.java Fri Nov 17 18:43:27 2017 +0530 +++ b/test/jdk/java/lang/invoke/SpreadCollectTest.java Fri Nov 17 08:12:02 2017 -0600 @@ -94,6 +94,21 @@ MethodHandle s = h.asSpreader(String[].class, 1); } + @Test(expectedExceptions = {NullPointerException.class}) + public static void testAsSpreaderNullArrayType() { + SpreadCollect.MH_forSpreading.asSpreader(null, 0); + } + + @Test(expectedExceptions = {NullPointerException.class}) + public static void testAsSpreaderNullArrayNonZeroLength() { + SpreadCollect.MH_forSpreading.asSpreader(null, 1); + } + + @Test(expectedExceptions = {IllegalArgumentException.class}) + public static void testAsSpreaderTooManyParams() throws Throwable { + SpreadCollect.MH_forSpreading.asSpreader(1, int[].class, 6); + } + @Test public static void testAsCollector() throws Throwable { MethodHandle collector = SpreadCollect.MH_forCollecting.asCollector(1, int[].class, 1);