test/jdk/java/lang/invoke/ArrayLengthTest.java
changeset 47856 76519338df34
parent 47216 71c04702a3d5
equal deleted inserted replaced
47855:72b6d674bde2 47856:76519338df34
    76     @Test(expectedExceptions = NullPointerException.class)
    76     @Test(expectedExceptions = NullPointerException.class)
    77     public void testArrayLengthNPE() {
    77     public void testArrayLengthNPE() {
    78         MethodHandles.arrayLength(null);
    78         MethodHandles.arrayLength(null);
    79     }
    79     }
    80 
    80 
       
    81     @Test(expectedExceptions = NullPointerException.class)
       
    82     public void testNullReference() throws Throwable {
       
    83         MethodHandle arrayLength = MethodHandles.arrayLength(String[].class);
       
    84         int len = (int)arrayLength.invokeExact((String[])null);
       
    85     }
    81 }
    86 }