src/share/vm/prims/jvmtiTrace.cpp

Print this page

        

@@ -264,15 +264,15 @@
   JavaThread *java_thread = (JavaThread *)thread;
   oop threadObj = java_thread->threadObj();
   if (threadObj == NULL) {
     return "NULL";
   }
-  typeArrayOop name = java_lang_Thread::name(threadObj);
+  oop name = java_lang_Thread::name(threadObj);
   if (name == NULL) {
     return "<NOT FILLED IN>";
   }
-  return UNICODE::as_utf8((jchar*) name->base(T_CHAR), name->length());
+  return java_lang_String::as_utf8_string(name);
 }
 
 
 // return the name of the current thread
 const char *JvmtiTrace::safe_get_current_thread_name() {