8205141: runtime/exceptionMsgs/ArrayStoreException/ArrayStoreExceptionTest.java failed with "assert(k->is_objArray_klass()) failed: cast to ObjArrayKlass
authorstuefe
Wed, 20 Jun 2018 06:51:39 +0200
changeset 50670 e810abb27deb
parent 50669 4935323c3e61
child 50671 1637a4e50fc9
8205141: runtime/exceptionMsgs/ArrayStoreException/ArrayStoreExceptionTest.java failed with "assert(k->is_objArray_klass()) failed: cast to ObjArrayKlass Reviewed-by: dholmes, goetz
test/hotspot/jtreg/runtime/exceptionMsgs/ArrayStoreException/ArrayStoreExceptionTest.java
test/hotspot/jtreg/runtime/exceptionMsgs/ArrayStoreException/libArrayStoreExceptionTest.c
--- a/test/hotspot/jtreg/runtime/exceptionMsgs/ArrayStoreException/ArrayStoreExceptionTest.java	Tue Jun 19 17:50:32 2018 -0700
+++ b/test/hotspot/jtreg/runtime/exceptionMsgs/ArrayStoreException/ArrayStoreExceptionTest.java	Wed Jun 20 06:51:39 2018 +0200
@@ -63,18 +63,6 @@
         }
     }
 
-    static native void doNativeArrayStore2(Object src, Object dst, int index);
-
-    static void testNativeASMessages2(Object array, Object elem, int index, String message)
-        throws Exception {
-        try {
-            doNativeArrayStore2(array, elem, index);
-            Asserts.fail("Expected ArrayStoreException not thrown");
-        } catch (ArrayIndexOutOfBoundsException e) {
-            Asserts.assertEquals(e.getMessage(), message);
-        }
-    }
-
     public static void main(String[] args) throws Exception {
         try {
             boolean[]    za1 = new boolean[3];
@@ -193,8 +181,6 @@
             testNativeASMessages(ia4, "This is not a date", 2,
                                  "type mismatch: can not store java.lang.String to int[2][][]");
 
-            testNativeASMessages2("This is not an array", "This is not a date", 2, "2");
-
         } catch (java.lang.RuntimeException e) {
             throw e;
         } catch (Exception e) {
--- a/test/hotspot/jtreg/runtime/exceptionMsgs/ArrayStoreException/libArrayStoreExceptionTest.c	Tue Jun 19 17:50:32 2018 -0700
+++ b/test/hotspot/jtreg/runtime/exceptionMsgs/ArrayStoreException/libArrayStoreExceptionTest.c	Wed Jun 20 06:51:39 2018 +0200
@@ -30,8 +30,3 @@
   (*env)->SetObjectArrayElement(env, array, index, element);
 }
 
-JNIEXPORT void JNICALL
-  Java_ArrayStoreExceptionTest_doNativeArrayStore2(JNIEnv *env, jclass klass,
-                                                   jobject array, jobject element, jint index) {
-  (*env)->SetObjectArrayElement(env, (jobjectArray)array, index, element);
-}