Skip to content

Commit fd38799

Browse files
committed
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".
1 parent fa391ee commit fd38799

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

unix/modjni.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,7 @@ STATIC mp_obj_t jobject_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value)
230230
} else if (value == MP_OBJ_SENTINEL) {
231231
// load
232232
jobject el = JJ(CallObjectMethod, self->obj, List_get_mid, idx);
233-
if (el == NULL) {
234-
check_exception();
235-
}
233+
check_exception();
236234
return new_jobject(el);
237235
} else {
238236
// store

0 commit comments

Comments
 (0)