native: Cleanup jni usage code
Make the C++ signature consistent with the JNI descriptor by using the
same type as the descriptor whenever possible.
e.g. "()Ljava/lang/String;" should actually be "jstring fn(JNIEnv*,jobject)"
instead of "jobject fn(JNIEnv*,jobject)".
Bug: 35325126
Change-Id: I72318525fc3b18b013b8d6fa604d8dd6b5dd4400
Test: make -j32 test-art-host # and also manually that it boots
diff --git a/runtime/native/java_lang_Class.cc b/runtime/native/java_lang_Class.cc
index e518553..a4a8a37 100644
--- a/runtime/native/java_lang_Class.cc
+++ b/runtime/native/java_lang_Class.cc
@@ -532,7 +532,7 @@
}
static jobject Class_getDeclaredMethodInternal(JNIEnv* env, jobject javaThis,
- jobject name, jobjectArray args) {
+ jstring name, jobjectArray args) {
ScopedFastNativeObjectAccess soa(env);
DCHECK_EQ(Runtime::Current()->GetClassLinker()->GetImagePointerSize(), kRuntimePointerSize);
DCHECK(!Runtime::Current()->IsActiveTransaction());