Fix broken DCHECK.
The DCHECK in ti_class_definition was incorrectly checking that the
original dex file was a primitive long instead of a boxed long.
Bug: 37271822
Test: ./test/testrunner/testrunner.py --host --jvmti-stress -j40
Change-Id: I901c6e2f6f93dca584faff70134cee957d8462c3
(cherry picked from commit 0ecb236aedb3debd0d000fb219a75e39879549a2)
diff --git a/runtime/openjdkjvmti/ti_class_definition.cc b/runtime/openjdkjvmti/ti_class_definition.cc
index 153692b..0671105 100644
--- a/runtime/openjdkjvmti/ti_class_definition.cc
+++ b/runtime/openjdkjvmti/ti_class_definition.cc
@@ -102,7 +102,9 @@
} else if (orig_dex->IsDexCache()) {
dex_file = orig_dex->AsDexCache()->GetDexFile();
} else {
- DCHECK_EQ(orig_dex->GetClass()->GetPrimitiveType(), art::Primitive::kPrimLong);
+ DCHECK(orig_dex->GetClass()->DescriptorEquals("Ljava/lang/Long;"))
+ << "Expected java/lang/Long but found object of type "
+ << orig_dex->GetClass()->PrettyClass();
art::ObjPtr<art::mirror::Class> prim_long_class(
art::Runtime::Current()->GetClassLinker()->GetClassRoot(
art::ClassLinker::kPrimitiveLong));