ObjPtr<>-ify array allocations.
And remove some unnecessary calls to ObjPtr<>::Ptr().
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: Ie313980f7f23b33b0ccea4fa8d5131d643c59080
diff --git a/runtime/native/java_lang_reflect_Method.cc b/runtime/native/java_lang_reflect_Method.cc
index 34455fe..87fda6b 100644
--- a/runtime/native/java_lang_reflect_Method.cc
+++ b/runtime/native/java_lang_reflect_Method.cc
@@ -69,7 +69,7 @@
// Return an empty array instead of a null pointer
ObjPtr<mirror::Class> class_array_class = GetClassRoot<mirror::ObjectArray<mirror::Class>>();
DCHECK(class_array_class != nullptr);
- mirror::ObjectArray<mirror::Class>* empty_array =
+ ObjPtr<mirror::ObjectArray<mirror::Class>> empty_array =
mirror::ObjectArray<mirror::Class>::Alloc(soa.Self(), class_array_class, 0);
return soa.AddLocalReference<jobjectArray>(empty_array);
} else {