--- a/hotspot/src/share/vm/prims/jni.cpp Mon Feb 03 13:41:26 2014 +0100
+++ b/hotspot/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;
+ }
}
}