summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Schettler <jschettler@google.com>2018-10-12 15:21:25 -0600
committerJesse Schettler <jschettler@google.com>2018-10-22 18:31:53 -0600
commite654da321d83c169f8e995d5134d135c951a3177 (patch)
treef09d032d02f123d722b4c59a194caa2cfda2b614
parentbc0225879a63c8a2fe735f5b1c7158a595fcb9af (diff)
downloadart-e654da321d83c169f8e995d5134d135c951a3177.tar.gz
Change ART FindClass method name to GetClass
The JNI FindClass method is easily confused with the ART FindClass method. This changes the name of the ART method to GetClass to reduce confusion. Bug: 112338190 Test: m -j Change-Id: Ie8c2d4785ad0ffd47fd80dfca6576ae5401b6b97 (cherry picked from commit 93d9e07334a10ff56e42b87953b3d5d67db276c3) Merged-In: Ie8c2d4785ad0ffd47fd80dfca6576ae5401b6b97
-rw-r--r--test/ti-agent/jni_binder.cc4
-rw-r--r--test/ti-agent/jni_binder.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/ti-agent/jni_binder.cc b/test/ti-agent/jni_binder.cc
index 585b4a4956..a115c22930 100644
--- a/test/ti-agent/jni_binder.cc
+++ b/test/ti-agent/jni_binder.cc
@@ -174,7 +174,7 @@ static jclass FindClassWithClassLoader(JNIEnv* env, const char* class_name, jobj
class_loader));
}
-jclass FindClass(jvmtiEnv* jvmti_env, JNIEnv* env, const char* class_name, jobject class_loader) {
+jclass GetClass(jvmtiEnv* jvmti_env, JNIEnv* env, const char* class_name, jobject class_loader) {
if (class_loader != nullptr) {
return FindClassWithClassLoader(env, class_name, class_loader);
}
@@ -251,7 +251,7 @@ void BindFunctionsOnClass(jvmtiEnv* jvmti_env, JNIEnv* env, jclass klass) {
void BindFunctions(jvmtiEnv* jvmti_env, JNIEnv* env, const char* class_name, jobject class_loader) {
// Use JNI to load the class.
- ScopedLocalRef<jclass> klass(env, FindClass(jvmti_env, env, class_name, class_loader));
+ ScopedLocalRef<jclass> klass(env, GetClass(jvmti_env, env, class_name, class_loader));
CHECK(klass.get() != nullptr) << class_name;
BindFunctionsOnClass(jvmti_env, env, klass.get());
}
diff --git a/test/ti-agent/jni_binder.h b/test/ti-agent/jni_binder.h
index e998dc561c..3d2ff9c47a 100644
--- a/test/ti-agent/jni_binder.h
+++ b/test/ti-agent/jni_binder.h
@@ -24,7 +24,7 @@ namespace art {
// Find the given classname. First try the implied classloader, then the system classloader,
// then use JVMTI to find all classloaders.
-jclass FindClass(jvmtiEnv* jvmti_env, JNIEnv* env, const char* class_name, jobject class_loader);
+jclass GetClass(jvmtiEnv* jvmti_env, JNIEnv* env, const char* class_name, jobject class_loader);
// Load the class through JNI. Inspect it, find all native methods. Construct the corresponding
// mangled name, run dlsym and bind the method.