mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8033126: Can't call default methods from JNI
Reviewed-by: dholmes, acorn, kamg
This commit is contained in:
parent
eaac73cf84
commit
731320a7fd
1 changed files with 7 additions and 3 deletions
|
@ -1320,9 +1320,13 @@ static void jni_invoke_nonstatic(JNIEnv *env, JavaValue* result, jobject receive
|
||||||
// interface call
|
// interface call
|
||||||
KlassHandle h_holder(THREAD, holder);
|
KlassHandle h_holder(THREAD, holder);
|
||||||
|
|
||||||
int itbl_index = m->itable_index();
|
if (call_type == JNI_VIRTUAL) {
|
||||||
Klass* k = h_recv->klass();
|
int itbl_index = m->itable_index();
|
||||||
selected_method = InstanceKlass::cast(k)->method_at_itable(h_holder(), itbl_index, CHECK);
|
Klass* k = h_recv->klass();
|
||||||
|
selected_method = InstanceKlass::cast(k)->method_at_itable(h_holder(), itbl_index, CHECK);
|
||||||
|
} else {
|
||||||
|
selected_method = m;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue