equal
deleted
inserted
replaced
86 assertEquals(methodType(String[].class, int.class), h.type()); |
86 assertEquals(methodType(String[].class, int.class), h.type()); |
87 String[] a = (String[]) h.invoke(17); |
87 String[] a = (String[]) h.invoke(17); |
88 assertEquals(17, a.length); |
88 assertEquals(17, a.length); |
89 } |
89 } |
90 |
90 |
|
91 @Test(expectedExceptions = {NegativeArraySizeException.class}) |
|
92 public static void testArrayConstructorNegativeIndex() throws Throwable { |
|
93 MethodHandle h = MethodHandles.arrayConstructor(String[].class); |
|
94 assertEquals(methodType(String[].class, int.class), h.type()); |
|
95 h.invoke(-1); // throws exception |
|
96 } |
|
97 |
91 } |
98 } |