unix/modjni: After Call*Method(), Java exception should always be checked.

OpenJDK seemed to return NULL in case of exception, but Dalvik returns
arbitrary value, so skip such "optimizations".
This commit is contained in:
Paul Sokolovsky 2015-10-07 07:39:41 +03:00
parent fa391eed9d
commit fd38799049

View File

@ -230,9 +230,7 @@ STATIC mp_obj_t jobject_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value)
} else if (value == MP_OBJ_SENTINEL) {
// load
jobject el = JJ(CallObjectMethod, self->obj, List_get_mid, idx);
if (el == NULL) {
check_exception();
}
check_exception();
return new_jobject(el);
} else {
// store