hotspot/src/share/vm/classfile/verifier.cpp
changeset 6172 e1d9c632fa3c
parent 5882 6b2aecc4f7d8
child 6173 c0c872cc6064
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Sat Jul 17 21:49:23 2010 -0700
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Tue Jul 20 08:41:42 2010 -0700
@@ -1847,12 +1847,8 @@
   if (type == VerificationType::uninitialized_this_type()) {
     // The method must be an <init> method of either this class, or one of its
     // superclasses
-    klassOop oop = current_class()();
-    Klass* klass = oop->klass_part();
-    while (klass != NULL && ref_class_type.name() != klass->name()) {
-      klass = klass->super()->klass_part();
-    }
-    if (klass == NULL) {
+    if (ref_class_type.name() != current_class()->name() &&
+        !name_in_supers(ref_class_type.name(), current_class())) {
       verify_error(bci, "Bad <init> method call");
       return;
     }