Make ResolveField not rely on Field::GetType resolution
Change-Id: I10f4a874809ac9db2cd54e200cf10eb7c8979fce
diff --git a/src/utils.cc b/src/utils.cc
index 3922033..a74e231 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -110,13 +110,19 @@
return result;
}
+std::string PrettyDescriptor(Primitive::Type type) {
+ char descriptor_char = Primitive::DescriptorChar(type);
+ std::string descriptor_string(1, descriptor_char);
+ return PrettyDescriptor(descriptor_string);
+}
+
std::string PrettyField(const Field* f, bool with_type) {
if (f == NULL) {
return "null";
}
std::string result;
if (with_type) {
- result += PrettyDescriptor(f->GetType()->GetDescriptor());
+ result += PrettyDescriptor(f->GetTypeDescriptor());
result += ' ';
}
result += PrettyDescriptor(f->GetDeclaringClass()->GetDescriptor());