summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vm/Misc.cpp2
-rw-r--r--vm/interp/Stack.cpp7
2 files changed, 2 insertions, 7 deletions
diff --git a/vm/Misc.cpp b/vm/Misc.cpp
index 059e6bbbc..136551614 100644
--- a/vm/Misc.cpp
+++ b/vm/Misc.cpp
@@ -269,7 +269,7 @@ std::string dvmHumanReadableDescriptor(const char* descriptor) {
std::string dvmHumanReadableType(const Object* obj)
{
if (obj == NULL) {
- return "(null)";
+ return "null";
}
if (obj->clazz == NULL) {
/* should only be possible right after a plain dvmMalloc() */
diff --git a/vm/interp/Stack.cpp b/vm/interp/Stack.cpp
index 7b12e7bc4..ad6af823d 100644
--- a/vm/interp/Stack.cpp
+++ b/vm/interp/Stack.cpp
@@ -635,12 +635,7 @@ bail:
static void throwArgumentTypeMismatch(int argIndex, ClassObject* expected, DataObject* arg) {
std::string expectedClassName(dvmHumanReadableDescriptor(expected->descriptor));
- std::string actualClassName;
- if (arg != NULL) {
- actualClassName = dvmHumanReadableType(arg);
- } else {
- actualClassName = "null";
- }
+ std::string actualClassName = dvmHumanReadableType(arg);
dvmThrowExceptionFmt(gDvm.exIllegalArgumentException, "argument %d should have type %s, got %s",
argIndex + 1, expectedClassName.c_str(), actualClassName.c_str());
}