< prev index next >

src/hotspot/share/prims/jniCheck.cpp

Print this page
@@ -254,11 +254,11 @@
  
    /* check for proper field type */
    if (!id->find_local_field(&fd))
      ReportJNIFatalError(thr, fatal_static_field_not_found);
    if ((fd.field_type() != ftype) &&
-       !(fd.field_type() == T_ARRAY && ftype == T_OBJECT)) {
+       !(fd.field_type() == T_ARRAY && ftype == T_OBJECT))  {
      ReportJNIFatalError(thr, fatal_static_field_mismatch);
    }
  }
  
  static inline void

@@ -342,13 +342,13 @@
      ReportJNIFatalError(thr, fatal_element_type_mismatch);
    }
  }
  
  static inline void
- check_is_obj_array(JavaThread* thr, jarray jArray) {
+ check_is_obj_or_inline_array(JavaThread* thr, jarray jArray) {
    arrayOop aOop = check_is_array(thr, jArray);
-   if (!aOop->is_objArray()) {
+   if (!aOop->is_objArray() && !aOop->is_flatArray()) {
      ReportJNIFatalError(thr, fatal_object_array_expected);
    }
  }
  
  /*

@@ -1625,11 +1625,11 @@
    checked_jni_GetObjectArrayElement(JNIEnv *env,
                                      jobjectArray array,
                                      jsize index))
      functionEnter(thr);
      IN_VM(
-       check_is_obj_array(thr, array);
+       check_is_obj_or_inline_array(thr, array);
      )
      jobject result = UNCHECKED()->GetObjectArrayElement(env,array,index);
      functionExit(thr);
      return result;
  JNI_END

@@ -1639,11 +1639,11 @@
                                      jobjectArray array,
                                      jsize index,
                                      jobject val))
      functionEnter(thr);
      IN_VM(
-       check_is_obj_array(thr, array);
+       check_is_obj_or_inline_array(thr, array);
      )
      UNCHECKED()->SetObjectArrayElement(env,array,index,val);
      functionExit(thr);
  JNI_END
  
< prev index next >