8020697: jniCheck.cpp:check_is_obj_array asserts on TypeArrayKlass::cast(aOop->klass())
authordholmes
Thu, 18 Jul 2013 06:47:15 -0400
changeset 18942 705506c1bf49
parent 18941 c597c9d69fbf
child 18943 7d0ef675e808
child 18944 85b1168d9b81
8020697: jniCheck.cpp:check_is_obj_array asserts on TypeArrayKlass::cast(aOop->klass()) Reviewed-by: dcubed, fparain, dholmes Contributed-by: David Simms <david.simms@oracle.com>
hotspot/src/share/vm/prims/jniCheck.cpp
--- a/hotspot/src/share/vm/prims/jniCheck.cpp	Wed Jul 17 17:14:50 2013 -0700
+++ b/hotspot/src/share/vm/prims/jniCheck.cpp	Thu Jul 18 06:47:15 2013 -0400
@@ -317,12 +317,8 @@
 
 static inline void
 check_is_obj_array(JavaThread* thr, jarray jArray) {
-  BasicType array_type;
-  arrayOop aOop;
-
-  aOop = check_is_array(thr, jArray);
-  array_type = TypeArrayKlass::cast(aOop->klass())->element_type();
-  if (array_type != T_OBJECT) {
+  arrayOop aOop = check_is_array(thr, jArray);
+  if (!aOop->is_objArray()) {
     ReportJNIFatalError(thr, fatal_object_array_expected);
   }
 }