Fix JNI NoSuchMethodErrors.
No point calling PrettyMethod if you've just determined that your Method* is
NULL...
Also a few other debugging aids.
Change-Id: I8af520716215800b7ffe4aef784b9c4ec15dcb92
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 67acf9d..1963985 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -546,8 +546,9 @@
std::string location = dex_cache->GetLocation()->ToModifiedUtf8();
location_to_dex_cache[location] = dex_cache;
}
- CHECK_EQ(boot_class_path.size() + class_path.size(),
- location_to_dex_cache.size());
+ CHECK(boot_class_path.size() + class_path.size() == location_to_dex_cache.size())
+ << "(" << boot_class_path.size() << " + " << class_path.size()
+ << " != " << location_to_dex_cache.size() << ")";
// reinit boot_class_path with DexFile arguments and found DexCaches
for (size_t i = 0; i != boot_class_path.size(); ++i) {