Avoid resolution for field types in image dumping.

Bug seen when dumping EMPTY_TABLE of java.util.HashMap as EMPTY_TABLE has type
java.util.Map$Entry[] which isn't in the boot image, but the value has type
java.util.HashMap$HashMapEntry[] which is.

Change-Id: Ia0bd445c6f5bb5837a92e6c2b2f4207e89b872f4
diff --git a/src/object_utils.h b/src/object_utils.h
index 6c6f60b..6a07425 100644
--- a/src/object_utils.h
+++ b/src/object_utils.h
@@ -282,13 +282,13 @@
       return field_index == 0 ? "interfaces" : "throws";
     }
   }
-  mirror::Class* GetType() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+  mirror::Class* GetType(bool resolve = true) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
     uint32_t field_index = field_->GetDexFieldIndex();
     if (!field_->GetDeclaringClass()->IsProxyClass()) {
       const DexFile& dex_file = GetDexFile();
       const DexFile::FieldId& field_id = dex_file.GetFieldId(field_index);
       mirror::Class* type = GetDexCache()->GetResolvedType(field_id.type_idx_);
-      if (type == NULL) {
+      if (resolve && (type == NULL)) {
         type = GetClassLinker()->ResolveType(field_id.type_idx_, field_);
         CHECK(type != NULL || Thread::Current()->IsExceptionPending());
       }