src/share/vm/classfile/javaClasses.cpp

Print this page

        

@@ -942,11 +942,11 @@
 
 void java_lang_Thread::compute_offsets() {
   assert(_group_offset == 0, "offsets should be initialized only once");
 
   Klass* k = SystemDictionary::Thread_klass();
-  compute_offset(_name_offset,      k, vmSymbols::name_name(),      vmSymbols::char_array_signature());
+  compute_offset(_name_offset,      k, vmSymbols::name_name(),      vmSymbols::string_signature());
   compute_offset(_group_offset,     k, vmSymbols::group_name(),     vmSymbols::threadgroup_signature());
   compute_offset(_contextClassLoader_offset, k, vmSymbols::contextClassLoader_name(), vmSymbols::classloader_signature());
   compute_offset(_inheritedAccessControlContext_offset, k, vmSymbols::inheritedAccessControlContext_name(), vmSymbols::accesscontrolcontext_signature());
   compute_offset(_priority_offset,  k, vmSymbols::priority_name(),  vmSymbols::int_signature());
   compute_offset(_daemon_offset,    k, vmSymbols::daemon_name(),    vmSymbols::bool_signature());

@@ -972,18 +972,18 @@
 void java_lang_Thread::set_thread(oop java_thread, JavaThread* thread) {
   java_thread->address_field_put(_eetop_offset, (address)thread);
 }
 
 
-typeArrayOop java_lang_Thread::name(oop java_thread) {
+oop java_lang_Thread::name(oop java_thread) {
   oop name = java_thread->obj_field(_name_offset);
-  assert(name == NULL || (name->is_typeArray() && TypeArrayKlass::cast(name->klass())->element_type() == T_CHAR), "just checking");
-  return typeArrayOop(name);
+  assert(name != NULL, "thread name is NULL");
+  return name;
 }
 
 
-void java_lang_Thread::set_name(oop java_thread, typeArrayOop name) {
+void java_lang_Thread::set_name(oop java_thread, oop name) {
   assert(java_thread->obj_field(_name_offset) == NULL, "name should be NULL");
   java_thread->obj_field_put(_name_offset, name);
 }