Remove ThrowLocation.
Note that this is a cleanup change, and has no functionality change.
The ThrowLocation had no use anymore.
Change-Id: I3d2126af1dc673cec3a0453ff3d56a172663a5f6
diff --git a/runtime/native/java_lang_reflect_Field.cc b/runtime/native/java_lang_reflect_Field.cc
index 2cebf02..9c5bde9 100644
--- a/runtime/native/java_lang_reflect_Field.cc
+++ b/runtime/native/java_lang_reflect_Field.cc
@@ -34,7 +34,7 @@
mirror::Object* obj)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
if (kIsSet && field->IsFinal()) {
- ThrowIllegalAccessException(nullptr,
+ ThrowIllegalAccessException(
StringPrintf("Cannot set %s field %s of class %s",
PrettyJavaAccessFlags(field->GetAccessFlags()).c_str(),
PrettyField(field).c_str(),
@@ -45,7 +45,7 @@
mirror::Class* calling_class = nullptr;
if (!VerifyAccess(self, obj, field->GetDeclaringClass(), field->GetAccessFlags(),
&calling_class)) {
- ThrowIllegalAccessException(nullptr,
+ ThrowIllegalAccessException(
StringPrintf("Class %s cannot access %s field %s of class %s",
calling_class == nullptr ? "null" : PrettyClass(calling_class).c_str(),
PrettyJavaAccessFlags(field->GetAccessFlags()).c_str(),
@@ -98,8 +98,8 @@
// Never okay.
break;
}
- ThrowIllegalArgumentException(nullptr, StringPrintf("Not a primitive field: %s",
- PrettyField(f).c_str()).c_str());
+ ThrowIllegalArgumentException(StringPrintf("Not a primitive field: %s",
+ PrettyField(f).c_str()).c_str());
return false;
}
@@ -190,7 +190,7 @@
}
// Widen it if necessary (and possible).
JValue wide_value;
- if (!ConvertPrimitiveValue(nullptr, false, field_type, kPrimitiveType, field_value,
+ if (!ConvertPrimitiveValue(false, field_type, kPrimitiveType, field_value,
&wide_value)) {
DCHECK(soa.Self()->IsExceptionPending());
return JValue();
@@ -270,8 +270,8 @@
FALLTHROUGH_INTENDED;
case Primitive::kPrimVoid:
// Never okay.
- ThrowIllegalArgumentException(nullptr, StringPrintf("Not a primitive field: %s",
- PrettyField(f).c_str()).c_str());
+ ThrowIllegalArgumentException(StringPrintf("Not a primitive field: %s",
+ PrettyField(f).c_str()).c_str());
return;
}
}
@@ -329,14 +329,14 @@
}
Primitive::Type field_type = f->GetTypeAsPrimitiveType();
if (UNLIKELY(field_type == Primitive::kPrimNot)) {
- ThrowIllegalArgumentException(nullptr, StringPrintf("Not a primitive field: %s",
- PrettyField(f).c_str()).c_str());
+ ThrowIllegalArgumentException(StringPrintf("Not a primitive field: %s",
+ PrettyField(f).c_str()).c_str());
return;
}
// Widen the value if necessary (and possible).
JValue wide_value;
- if (!ConvertPrimitiveValue(nullptr, false, kPrimitiveType, field_type, new_value, &wide_value)) {
+ if (!ConvertPrimitiveValue(false, kPrimitiveType, field_type, new_value, &wide_value)) {
DCHECK(soa.Self()->IsExceptionPending());
return;
}