Mercurial > hg > truffle
diff src/share/vm/prims/jni.cpp @ 17685:fd07a7e4222b
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 | a034dc5e910b |
children | cc3f124c6eae |
line wrap: on
line diff
--- a/src/share/vm/prims/jni.cpp Thu Jan 23 09:06:21 2014 +0100 +++ b/src/share/vm/prims/jni.cpp Mon Feb 03 15:24:20 2014 +0100 @@ -1356,9 +1356,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; + } } }