summaryrefslogtreecommitdiffstats
path: root/vm/native/InternalNative.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vm/native/InternalNative.cpp')
-rw-r--r--vm/native/InternalNative.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/vm/native/InternalNative.cpp b/vm/native/InternalNative.cpp
index 708deab41..7ba1a6463 100644
--- a/vm/native/InternalNative.cpp
+++ b/vm/native/InternalNative.cpp
@@ -165,12 +165,7 @@ bool dvmVerifyObjectInClass(Object* obj, ClassObject* clazz) {
}
std::string expectedClassName(dvmHumanReadableDescriptor(clazz->descriptor));
- std::string actualClassName;
- if (obj != NULL) {
- actualClassName = dvmHumanReadableDescriptor(obj->clazz->descriptor);
- } else {
- actualClassName = "null";
- }
+ std::string actualClassName(dvmHumanReadableType(obj));
dvmThrowExceptionFmt(exceptionClass, "expected receiver of type %s, but got %s",
expectedClassName.c_str(), actualClassName.c_str());
return false;