hotspot/src/share/vm/interpreter/linkResolver.cpp
changeset 14391 df0a1573d5bd
parent 14385 959bbcc16725
child 14488 ab48109f7d1b
--- a/hotspot/src/share/vm/interpreter/linkResolver.cpp	Thu Oct 04 14:55:57 2012 +0200
+++ b/hotspot/src/share/vm/interpreter/linkResolver.cpp	Tue Nov 06 15:09:37 2012 -0500
@@ -133,7 +133,7 @@
       // don't force compilation, resolve was on behalf of compiler
       return;
     }
-    if (InstanceKlass::cast(selected_method->method_holder())->is_not_initialized()) {
+    if (selected_method->method_holder()->is_not_initialized()) {
       // 'is_not_initialized' means not only '!is_initialized', but also that
       // initialization has not been started yet ('!being_initialized')
       // Do not force compilation of methods in uninitialized classes.
@@ -466,7 +466,7 @@
 
     // check loader constraints
     Handle loader (THREAD, InstanceKlass::cast(current_klass())->class_loader());
-    Handle class_loader (THREAD, InstanceKlass::cast(resolved_method->method_holder())->class_loader());
+    Handle class_loader (THREAD, resolved_method->method_holder()->class_loader());
     {
       ResourceMark rm(THREAD);
       char* failed_type_name =
@@ -528,7 +528,7 @@
   if (check_access) {
     HandleMark hm(THREAD);
     Handle loader (THREAD, InstanceKlass::cast(current_klass())->class_loader());
-    Handle class_loader (THREAD, InstanceKlass::cast(resolved_method->method_holder())->class_loader());
+    Handle class_loader (THREAD, resolved_method->method_holder()->class_loader());
     {
       ResourceMark rm(THREAD);
       char* failed_type_name =
@@ -910,12 +910,12 @@
 
   // Virtual methods cannot be resolved before its klass has been linked, for otherwise the Method*'s
   // has not been rewritten, and the vtable initialized.
-  assert(InstanceKlass::cast(resolved_method->method_holder())->is_linked(), "must be linked");
+  assert(resolved_method->method_holder()->is_linked(), "must be linked");
 
   // Virtual methods cannot be resolved before its klass has been linked, for otherwise the Method*'s
   // has not been rewritten, and the vtable initialized. Make sure to do this after the nullcheck, since
   // a missing receiver might result in a bogus lookup.
-  assert(InstanceKlass::cast(resolved_method->method_holder())->is_linked(), "must be linked");
+  assert(resolved_method->method_holder()->is_linked(), "must be linked");
 
   // do lookup based on receiver klass using the vtable index
   if (resolved_method->method_holder()->is_interface()) { // miranda method