< prev index next >

test/hotspot/jtreg/runtime/exceptionMsgs/NullPointerException/NullPointerExceptionTest.java

Print this page
@@ -303,11 +303,11 @@
              System.out.println(oa1[0]);
              Asserts.fail();
          } catch (NullPointerException e) {
              checkMessage(e, "oa1[0] = new Object();", e.getMessage(),
                           "Cannot store to object array because " +
-                          (hasDebugInfo ? "\"oa1\"" : "\"<local3>\"") + " is null");
+                          (hasDebugInfo ? "\"oa1\"" : "\"<local3>\"") + " is null or is a null-free array and there's an attempt to store null in it");
          }
          // bastore (boolean)
          try {
              za1[0] = false;
              System.out.println(za1[0]);

@@ -1364,11 +1364,11 @@
  
      public void testNative() throws Exception {
          // If NPE is thrown in a native method, the message should
          // not be generated.
          try {
-             Array.get(null,0);
+             Array.getLength(null);
              Asserts.fail();
          } catch (NullPointerException e) {
              Asserts.assertNull(e.getMessage());
          }
      }
< prev index next >