mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +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
|
||||
KlassHandle h_holder(THREAD, holder);
|
||||
|
||||
if (call_type == JNI_VIRTUAL) {
|
||||
int itbl_index = m->itable_index();
|
||||
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