< prev index next > src/hotspot/share/prims/jniCheck.cpp
Print this page
/* 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)) {
ReportJNIFatalError(thr, fatal_static_field_mismatch);
}
}
static inline void
/* 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)) {
ReportJNIFatalError(thr, fatal_static_field_mismatch);
}
}
static inline void
ReportJNIFatalError(thr, fatal_element_type_mismatch);
}
}
static inline void
! check_is_obj_array(JavaThread* thr, jarray jArray) {
arrayOop aOop = check_is_array(thr, jArray);
! if (!aOop->is_objArray()) {
ReportJNIFatalError(thr, fatal_object_array_expected);
}
}
/*
ReportJNIFatalError(thr, fatal_element_type_mismatch);
}
}
static inline void
! check_is_obj_or_inline_array(JavaThread* thr, jarray jArray) {
arrayOop aOop = check_is_array(thr, jArray);
! if (!aOop->is_objArray() && !aOop->is_flatArray()) {
ReportJNIFatalError(thr, fatal_object_array_expected);
}
}
/*
checked_jni_GetObjectArrayElement(JNIEnv *env,
jobjectArray array,
jsize index))
functionEnter(thr);
IN_VM(
! check_is_obj_array(thr, array);
)
jobject result = UNCHECKED()->GetObjectArrayElement(env,array,index);
functionExit(thr);
return result;
JNI_END
checked_jni_GetObjectArrayElement(JNIEnv *env,
jobjectArray array,
jsize index))
functionEnter(thr);
IN_VM(
! check_is_obj_or_inline_array(thr, array);
)
jobject result = UNCHECKED()->GetObjectArrayElement(env,array,index);
functionExit(thr);
return result;
JNI_END
jobjectArray array,
jsize index,
jobject val))
functionEnter(thr);
IN_VM(
! check_is_obj_array(thr, array);
)
UNCHECKED()->SetObjectArrayElement(env,array,index,val);
functionExit(thr);
JNI_END
jobjectArray array,
jsize index,
jobject val))
functionEnter(thr);
IN_VM(
! check_is_obj_or_inline_array(thr, array);
)
UNCHECKED()->SetObjectArrayElement(env,array,index,val);
functionExit(thr);
JNI_END
< prev index next >