equal
deleted
inserted
replaced
639 } |
639 } |
640 // Compare primary supers |
640 // Compare primary supers |
641 int super_depth = klass->super_depth(); |
641 int super_depth = klass->super_depth(); |
642 int idx; |
642 int idx; |
643 for (idx = 0; idx < super_depth; idx++) { |
643 for (idx = 0; idx < super_depth; idx++) { |
644 if (Klass::cast(klass->primary_super_of_depth(idx))->name() == ty_sym) { |
644 if (klass->primary_super_of_depth(idx)->name() == ty_sym) { |
645 return true; |
645 return true; |
646 } |
646 } |
647 } |
647 } |
648 // Compare secondary supers |
648 // Compare secondary supers |
649 Array<Klass*>* sec_supers = klass->secondary_supers(); |
649 Array<Klass*>* sec_supers = klass->secondary_supers(); |
650 for (idx = 0; idx < sec_supers->length(); idx++) { |
650 for (idx = 0; idx < sec_supers->length(); idx++) { |
651 if (Klass::cast((Klass*) sec_supers->at(idx))->name() == ty_sym) { |
651 if (((Klass*) sec_supers->at(idx))->name() == ty_sym) { |
652 return true; |
652 return true; |
653 } |
653 } |
654 } |
654 } |
655 return false; |
655 return false; |
656 } |
656 } |
724 Handle obj = Handle(cur_thread, JNIHandles::resolve_external_guard(jobj)); |
724 Handle obj = Handle(cur_thread, JNIHandles::resolve_external_guard(jobj)); |
725 NULL_CHECK(obj, (_result = JVMTI_ERROR_INVALID_OBJECT, false)); |
725 NULL_CHECK(obj, (_result = JVMTI_ERROR_INVALID_OBJECT, false)); |
726 KlassHandle ob_kh = KlassHandle(cur_thread, obj->klass()); |
726 KlassHandle ob_kh = KlassHandle(cur_thread, obj->klass()); |
727 NULL_CHECK(ob_kh, (_result = JVMTI_ERROR_INVALID_OBJECT, false)); |
727 NULL_CHECK(ob_kh, (_result = JVMTI_ERROR_INVALID_OBJECT, false)); |
728 |
728 |
729 if (!is_assignable(signature, Klass::cast(ob_kh()), cur_thread)) { |
729 if (!is_assignable(signature, ob_kh(), cur_thread)) { |
730 _result = JVMTI_ERROR_TYPE_MISMATCH; |
730 _result = JVMTI_ERROR_TYPE_MISMATCH; |
731 return false; |
731 return false; |
732 } |
732 } |
733 } |
733 } |
734 return true; |
734 return true; |