Mercurial > hg > truffle
changeset 14320:602e80a36dfb
8033126: Can't call default methods from JNI
Reviewed-by: dholmes, acorn, kamg
author | sla |
---|---|
date | Mon, 03 Feb 2014 15:24:20 +0100 |
parents | a00b8f42c4c4 |
children | e4062d6c5f22 |
files | src/share/vm/prims/jni.cpp |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/prims/jni.cpp Mon Feb 03 13:41:26 2014 +0100 +++ b/src/share/vm/prims/jni.cpp Mon Feb 03 15:24:20 2014 +0100 @@ -1320,9 +1320,13 @@ // interface call KlassHandle h_holder(THREAD, holder); - int itbl_index = m->itable_index(); - Klass* k = h_recv->klass(); - selected_method = InstanceKlass::cast(k)->method_at_itable(h_holder(), itbl_index, CHECK); + 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; + } } }