1.1 --- a/src/share/vm/prims/jni.cpp Thu Sep 19 09:34:20 2013 +0200 1.2 +++ b/src/share/vm/prims/jni.cpp Thu Sep 19 18:01:39 2013 +0200 1.3 @@ -1336,6 +1336,7 @@ 1.4 if (call_type == JNI_VIRTUAL) { 1.5 // jni_GetMethodID makes sure class is linked and initialized 1.6 // so m should have a valid vtable index. 1.7 + assert(!m->has_itable_index(), ""); 1.8 int vtbl_index = m->vtable_index(); 1.9 if (vtbl_index != Method::nonvirtual_vtable_index) { 1.10 Klass* k = h_recv->klass(); 1.11 @@ -1355,12 +1356,7 @@ 1.12 // interface call 1.13 KlassHandle h_holder(THREAD, holder); 1.14 1.15 - int itbl_index = m->cached_itable_index(); 1.16 - if (itbl_index == -1) { 1.17 - itbl_index = klassItable::compute_itable_index(m); 1.18 - m->set_cached_itable_index(itbl_index); 1.19 - // the above may have grabbed a lock, 'm' and anything non-handlized can't be used again 1.20 - } 1.21 + int itbl_index = m->itable_index(); 1.22 Klass* k = h_recv->klass(); 1.23 selected_method = InstanceKlass::cast(k)->method_at_itable(h_holder(), itbl_index, CHECK); 1.24 }