hotspot/src/share/vm/classfile/verifier.cpp
changeset 12986 14b117407405
parent 9116 9bc44be338d6
child 12990 8ff1c75f204a
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Thu Apr 12 12:07:09 2012 -0700
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Thu May 03 15:37:46 2012 -0400
@@ -1880,10 +1880,10 @@
   VerificationType type = current_frame->pop_stack(
     VerificationType::reference_check(), CHECK_VERIFY(this));
   if (type == VerificationType::uninitialized_this_type()) {
-    // The method must be an <init> method of either this class, or one of its
-    // superclasses
+    // The method must be an <init> method of this class or its superclass
+    klassOop superk = current_class()->super();
     if (ref_class_type.name() != current_class()->name() &&
-        !name_in_supers(ref_class_type.name(), current_class())) {
+        ref_class_type.name() != superk->klass_part()->name()) {
       verify_error(bci, "Bad <init> method call");
       return;
     }