src/share/vm/classfile/verifier.cpp

changeset 2032
a5c9d63a187d
parent 1957
136b78722a08
child 2033
7f0fdccac34f
equal deleted inserted replaced
2031:920aa833fd16 2032:a5c9d63a187d
1845 VerificationType type = current_frame->pop_stack( 1845 VerificationType type = current_frame->pop_stack(
1846 VerificationType::reference_check(), CHECK_VERIFY(this)); 1846 VerificationType::reference_check(), CHECK_VERIFY(this));
1847 if (type == VerificationType::uninitialized_this_type()) { 1847 if (type == VerificationType::uninitialized_this_type()) {
1848 // The method must be an <init> method of either this class, or one of its 1848 // The method must be an <init> method of either this class, or one of its
1849 // superclasses 1849 // superclasses
1850 klassOop oop = current_class()(); 1850 if (ref_class_type.name() != current_class()->name() &&
1851 Klass* klass = oop->klass_part(); 1851 !name_in_supers(ref_class_type.name(), current_class())) {
1852 while (klass != NULL && ref_class_type.name() != klass->name()) {
1853 klass = klass->super()->klass_part();
1854 }
1855 if (klass == NULL) {
1856 verify_error(bci, "Bad <init> method call"); 1852 verify_error(bci, "Bad <init> method call");
1857 return; 1853 return;
1858 } 1854 }
1859 current_frame->initialize_object(type, current_type()); 1855 current_frame->initialize_object(type, current_type());
1860 *this_uninit = true; 1856 *this_uninit = true;

mercurial