src/share/vm/classfile/verifier.cpp

changeset 3858
d558e01a72c0
parent 2742
ed69575596ac
child 3862
9d5f20961bc5
     1.1 --- a/src/share/vm/classfile/verifier.cpp	Thu Apr 12 12:07:09 2012 -0700
     1.2 +++ b/src/share/vm/classfile/verifier.cpp	Thu May 03 15:37:46 2012 -0400
     1.3 @@ -1880,10 +1880,10 @@
     1.4    VerificationType type = current_frame->pop_stack(
     1.5      VerificationType::reference_check(), CHECK_VERIFY(this));
     1.6    if (type == VerificationType::uninitialized_this_type()) {
     1.7 -    // The method must be an <init> method of either this class, or one of its
     1.8 -    // superclasses
     1.9 +    // The method must be an <init> method of this class or its superclass
    1.10 +    klassOop superk = current_class()->super();
    1.11      if (ref_class_type.name() != current_class()->name() &&
    1.12 -        !name_in_supers(ref_class_type.name(), current_class())) {
    1.13 +        ref_class_type.name() != superk->klass_part()->name()) {
    1.14        verify_error(bci, "Bad <init> method call");
    1.15        return;
    1.16      }

mercurial