hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
changeset 36508 5f9eee6b383b
parent 35928 084d5cb04276
child 37272 c427db4ea8c4
child 37179 4dbcb3a642d2
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	Tue Mar 15 13:48:21 2016 -0700
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	Thu Mar 17 19:04:01 2016 +0000
@@ -2258,10 +2258,8 @@
               // Decrement counter at checkcast.
               BI_PROFILE_SUBTYPECHECK_FAILED(objKlass);
               ResourceMark rm(THREAD);
-              const char* objName = objKlass->external_name();
-              const char* klassName = klassOf->external_name();
               char* message = SharedRuntime::generate_class_cast_message(
-                objName, klassName);
+                objKlass, klassOf);
               VM_JAVA_ERROR(vmSymbols::java_lang_ClassCastException(), message, note_classCheck_trap);
             }
             // Profile checkcast with null_seen and receiver.