diff options
Diffstat (limited to 'runtime/native/java_lang_reflect_Array.cc')
| -rw-r--r-- | runtime/native/java_lang_reflect_Array.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/runtime/native/java_lang_reflect_Array.cc b/runtime/native/java_lang_reflect_Array.cc index 21975974e4..fc30aa6a1b 100644 --- a/runtime/native/java_lang_reflect_Array.cc +++ b/runtime/native/java_lang_reflect_Array.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "class_linker.h" +#include "class_linker-inl.h" #include "common_throws.h" #include "dex_file-inl.h" #include "jni_internal.h" @@ -50,12 +50,8 @@ static jobject Array_createObjectArray(JNIEnv* env, jclass, jclass javaElementCl ThrowNegativeArraySizeException(length); return NULL; } - std::string descriptor("["); - descriptor += ClassHelper(element_class).GetDescriptor(); - ClassLinker* class_linker = Runtime::Current()->GetClassLinker(); - SirtRef<mirror::ClassLoader> class_loader(soa.Self(), element_class->GetClassLoader()); - mirror::Class* array_class = class_linker->FindClass(descriptor.c_str(), class_loader); + mirror::Class* array_class = class_linker->FindArrayClass(soa.Self(), element_class); if (UNLIKELY(array_class == NULL)) { CHECK(soa.Self()->IsExceptionPending()); return NULL; |
