summaryrefslogtreecommitdiff
path: root/src/java_lang_Class.cc
diff options
context:
space:
mode:
author Brian Carlstrom <bdc@google.com> 2011-09-18 10:52:00 -0700
committer Brian Carlstrom <bdc@google.com> 2011-09-18 10:52:00 -0700
commit03c99df35373efa1924d0ab9c0d21f9061afe8ea (patch)
tree211cd72a2713c6a2d9f99f8c999e651f50432959 /src/java_lang_Class.cc
parent534f045c57532f5689ccad269faa35b655a44f77 (diff)
Fix Class_getDeclaredConstructorOrMethod to look at direct as well as virtual methods
Change-Id: Ibc34e3e55b408b2ef04e439960c63fb6e98d06eb
Diffstat (limited to 'src/java_lang_Class.cc')
-rw-r--r--src/java_lang_Class.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/java_lang_Class.cc b/src/java_lang_Class.cc
index 3e80c6b14f..8ad59b4566 100644
--- a/src/java_lang_Class.cc
+++ b/src/java_lang_Class.cc
@@ -51,7 +51,7 @@ jobject Class_getDeclaredConstructorOrMethod(JNIEnv* env, jclass,
DCHECK(name->IsString());
Object* signature_obj = Decode<Object*>(env, jsignature);
DCHECK(signature_obj->IsArrayInstance());
- // check that this is a Class[] by checkin that component type is Class
+ // check that this is a Class[] by checking that component type is Class
// foo->GetClass()->GetClass() is an idiom for getting java.lang.Class from an arbitrary object
DCHECK(signature_obj->GetClass()->GetComponentType() == signature_obj->GetClass()->GetClass());
ObjectArray<Class>* signature = down_cast<ObjectArray<Class>*>(signature_obj);
@@ -80,8 +80,8 @@ jobject Class_getDeclaredConstructorOrMethod(JNIEnv* env, jclass,
return AddLocalReference<jobject>(env, method);
}
- for (size_t i = 0; i < klass->NumVirtualMethods(); ++i) {
- Method* method = klass->GetVirtualMethod(i);
+ for (size_t i = 0; i < klass->NumDirectMethods(); ++i) {
+ Method* method = klass->GetDirectMethod(i);
if (!method->GetName()->Equals(name)) {
continue;
}