Clinits may not have the kAccConstructor flag.
Bug: 11157540
Set the clinit access flag when we load the method and warn about badly
formed access flags.
Change-Id: I515c692095051f84f98510722ab764591185918e
diff --git a/runtime/object_utils.h b/runtime/object_utils.h
index 692cecc..8062a89 100644
--- a/runtime/object_utils.h
+++ b/runtime/object_utils.h
@@ -592,7 +592,7 @@
}
bool IsClassInitializer() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- return IsStatic() && GetNameAsStringPiece() == "<clinit>";
+ return method_->IsConstructor() && IsStatic();
}
size_t NumArgs() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {