src/hotspot/share/prims/jniCheck.cpp
changeset 58562 e43ac61b89ab
parent 58479 35ce0ad5870a
child 58679 9c3209ff7550
child 58760 1f7f707c1aa9
equal deleted inserted replaced
58561:3968bf3673c5 58562:e43ac61b89ab
   532   }
   532   }
   533 
   533 
   534   if (obj != NULL) {
   534   if (obj != NULL) {
   535     oop recv = jniCheck::validate_object(thr, obj);
   535     oop recv = jniCheck::validate_object(thr, obj);
   536     assert(recv != NULL, "validate_object checks that");
   536     assert(recv != NULL, "validate_object checks that");
   537     Klass* ik = recv->klass();
   537     Klass* rk = recv->klass();
   538 
   538 
   539     // Check that the object is a subtype of method holder too.
   539     // Check that the object is a subtype of method holder too.
   540     if (!InstanceKlass::cast(ik)->is_subtype_of(holder)) {
   540     if (!rk->is_subtype_of(holder)) {
   541       ReportJNIFatalError(thr, fatal_wrong_class_or_method);
   541       ReportJNIFatalError(thr, fatal_wrong_class_or_method);
   542     }
   542     }
   543   }
   543   }
   544 }
   544 }
   545 
   545