summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-10-19 23:56:48 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-10-19 23:56:48 +0000
commitcda353495692952fdbede2c79d91c1f5dc10d64b (patch)
tree511be808d4ac65a9c8464ec5d910f815c5cf23de
parentf309e410bae38e92fda692c7de178b7e94b8053d (diff)
parentbffd32f40cdf213cac49eb067a589ee6972371e3 (diff)
downloadart-android11-mainline-sparse-2020-dec-release.tar.gz
Snap for 6916203 from bffd32f40cdf213cac49eb067a589ee6972371e3 to mainline-releaseandroid-mainline-11.0.0_r9android-mainline-11.0.0_r3android-mainline-11.0.0_r29android11-mainline-sparse-2020-dec-release
Change-Id: I28447295a6c2d37495a8dc0d194afcf10fe1bb95
-rw-r--r--tools/hiddenapi/hiddenapi.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/hiddenapi/hiddenapi.cc b/tools/hiddenapi/hiddenapi.cc
index f6d599fe1c..0ef0e0878b 100644
--- a/tools/hiddenapi/hiddenapi.cc
+++ b/tools/hiddenapi/hiddenapi.cc
@@ -525,18 +525,19 @@ class Hierarchy final {
continue;
}
- HierarchyClass* superclass = FindClass(dex_klass.GetSuperclassDescriptor());
- CHECK(superclass != nullptr)
- << "Superclass " << dex_klass.GetSuperclassDescriptor()
+ auto add_extends = [&](const std::string_view& extends_desc) {
+ HierarchyClass* extends = FindClass(extends_desc);
+ CHECK(extends != nullptr)
+ << "Superclass/interface " << extends_desc
<< " of class " << dex_klass.GetDescriptor() << " from dex file \""
<< dex_klass.GetDexFile().GetLocation() << "\" was not found. "
- << "Either the superclass is missing or it appears later in the classpath spec.";
- klass.AddExtends(*superclass);
+ << "Either it is missing or it appears later in the classpath spec.";
+ klass.AddExtends(*extends);
+ };
+ add_extends(dex_klass.GetSuperclassDescriptor());
for (const std::string_view& iface_desc : dex_klass.GetInterfaceDescriptors()) {
- HierarchyClass* iface = FindClass(iface_desc);
- CHECK(iface != nullptr);
- klass.AddExtends(*iface);
+ add_extends(iface_desc);
}
}
}