1.1 --- a/src/share/vm/prims/jvmtiExport.cpp Fri Nov 16 09:59:08 2012 +0100 1.2 +++ b/src/share/vm/prims/jvmtiExport.cpp Fri Nov 16 09:19:12 2012 -0500 1.3 @@ -196,7 +196,7 @@ 1.4 jobject to_jobject(oop obj) { return JNIHandles::make_local(_thread,obj); } 1.5 #endif 1.6 1.7 - jclass to_jclass(Klass* klass) { return (klass == NULL ? NULL : (jclass)to_jobject(Klass::cast(klass)->java_mirror())); } 1.8 + jclass to_jclass(Klass* klass) { return (klass == NULL ? NULL : (jclass)to_jobject(klass->java_mirror())); } 1.9 1.10 jmethodID to_jmethodID(methodHandle method) { return method->jmethod_id(); } 1.11 1.12 @@ -920,7 +920,7 @@ 1.13 if (ets->is_enabled(JVMTI_EVENT_CLASS_LOAD)) { 1.14 EVT_TRACE(JVMTI_EVENT_CLASS_LOAD, ("JVMTI [%s] Evt Class Load sent %s", 1.15 JvmtiTrace::safe_get_thread_name(thread), 1.16 - kh()==NULL? "NULL" : Klass::cast(kh())->external_name() )); 1.17 + kh()==NULL? "NULL" : kh()->external_name() )); 1.18 1.19 JvmtiEnv *env = ets->get_env(); 1.20 JvmtiClassEventMark jem(thread, kh()); 1.21 @@ -949,7 +949,7 @@ 1.22 if (ets->is_enabled(JVMTI_EVENT_CLASS_PREPARE)) { 1.23 EVT_TRACE(JVMTI_EVENT_CLASS_PREPARE, ("JVMTI [%s] Evt Class Prepare sent %s", 1.24 JvmtiTrace::safe_get_thread_name(thread), 1.25 - kh()==NULL? "NULL" : Klass::cast(kh())->external_name() )); 1.26 + kh()==NULL? "NULL" : kh()->external_name() )); 1.27 1.28 JvmtiEnv *env = ets->get_env(); 1.29 JvmtiClassEventMark jem(thread, kh()); 1.30 @@ -979,12 +979,12 @@ 1.31 for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) { 1.32 if (env->is_enabled((jvmtiEvent)EXT_EVENT_CLASS_UNLOAD)) { 1.33 EVT_TRACE(EXT_EVENT_CLASS_UNLOAD, ("JVMTI [?] Evt Class Unload sent %s", 1.34 - kh()==NULL? "NULL" : Klass::cast(kh())->external_name() )); 1.35 + kh()==NULL? "NULL" : kh()->external_name() )); 1.36 1.37 // do everything manually, since this is a proxy - needs special care 1.38 JNIEnv* jni_env = real_thread->jni_environment(); 1.39 jthread jt = (jthread)JNIHandles::make_local(real_thread, real_thread->threadObj()); 1.40 - jclass jk = (jclass)JNIHandles::make_local(real_thread, Klass::cast(kh())->java_mirror()); 1.41 + jclass jk = (jclass)JNIHandles::make_local(real_thread, kh()->java_mirror()); 1.42 1.43 // Before we call the JVMTI agent, we have to set the state in the 1.44 // thread for which we are proxying. 1.45 @@ -2121,7 +2121,7 @@ 1.46 if (env->is_enabled(JVMTI_EVENT_VM_OBJECT_ALLOC)) { 1.47 EVT_TRACE(JVMTI_EVENT_VM_OBJECT_ALLOC, ("JVMTI [%s] Evt vmobject alloc sent %s", 1.48 JvmtiTrace::safe_get_thread_name(thread), 1.49 - object==NULL? "NULL" : Klass::cast(java_lang_Class::as_Klass(object))->external_name())); 1.50 + object==NULL? "NULL" : java_lang_Class::as_Klass(object)->external_name())); 1.51 1.52 JvmtiVMObjectAllocEventMark jem(thread, h()); 1.53 JvmtiJavaThreadEventTransition jet(thread);