ART: Add operator == and != with nullptr to Handle
Get it in line with ObjPtr and prettify our code.
Test: m
Change-Id: I1322e2a9bc7a85d7f2441034a19bf4d807b81a0e
diff --git a/runtime/native/java_lang_reflect_Executable.cc b/runtime/native/java_lang_reflect_Executable.cc
index ee59c4a..2a39428 100644
--- a/runtime/native/java_lang_reflect_Executable.cc
+++ b/runtime/native/java_lang_reflect_Executable.cc
@@ -103,7 +103,7 @@
}
// Validate the MethodParameters system annotation data.
- if (UNLIKELY(names.Get() == nullptr || access_flags.Get() == nullptr)) {
+ if (UNLIKELY(names == nullptr || access_flags == nullptr)) {
ThrowIllegalArgumentException(
StringPrintf("Missing parameter metadata for names or access flags for %s",
art_method->PrettyMethod().c_str()).c_str());
@@ -132,7 +132,7 @@
mirror::ObjectArray<mirror::Object>::Alloc(self,
parameter_array_class.Get(),
names_count));
- if (UNLIKELY(parameter_array.Get() == nullptr)) {
+ if (UNLIKELY(parameter_array == nullptr)) {
self->AssertPendingException();
return nullptr;
}
@@ -154,7 +154,7 @@
// Allocate / initialize the Parameter to add to parameter_array.
parameter.Assign(parameter_class->AllocObject(self));
- if (UNLIKELY(parameter.Get() == nullptr)) {
+ if (UNLIKELY(parameter == nullptr)) {
self->AssertPendingOOMException();
return nullptr;
}