hotspot/src/share/vm/prims/jni.cpp
changeset 35900 d64cf9290fc4
parent 35519 9200162499f7
child 36183 15d5045f46c2
--- a/hotspot/src/share/vm/prims/jni.cpp	Tue Dec 01 10:35:49 2015 +0100
+++ b/hotspot/src/share/vm/prims/jni.cpp	Tue Jan 19 12:07:32 2016 +0100
@@ -1131,11 +1131,7 @@
       assert(m->valid_vtable_index(), "no valid vtable index");
       int vtbl_index = m->vtable_index();
       if (vtbl_index != Method::nonvirtual_vtable_index) {
-        Klass* k = h_recv->klass();
-        // k might be an arrayKlassOop but all vtables start at
-        // the same place. The cast is to avoid virtual call and assertion.
-        InstanceKlass *ik = (InstanceKlass*)k;
-        selected_method = ik->method_at_vtable(vtbl_index);
+        selected_method = h_recv->klass()->method_at_vtable(vtbl_index);
       } else {
         // final method
         selected_method = m;