--- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp Mon Oct 21 17:26:46 2013 -0700
+++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp Tue Oct 22 14:29:02 2013 -0700
@@ -259,8 +259,7 @@
// bytes to the InstanceKlass here because they have not been
// validated and we're not at a safepoint.
constantPoolHandle constants(current_thread, ikh->constants());
- oop cplock = constants->lock();
- ObjectLocker ol(cplock, current_thread, cplock != NULL); // lock constant pool while we query it
+ MonitorLockerEx ml(constants->lock()); // lock constant pool while we query it
JvmtiClassFileReconstituter reconstituter(ikh);
if (reconstituter.get_error() != JVMTI_ERROR_NONE) {
@@ -2418,8 +2417,7 @@
instanceKlassHandle ikh(thread, k_oop);
constantPoolHandle constants(thread, ikh->constants());
- oop cplock = constants->lock();
- ObjectLocker ol(cplock, thread, cplock != NULL); // lock constant pool while we query it
+ MonitorLockerEx ml(constants->lock()); // lock constant pool while we query it
JvmtiConstantPoolReconstituter reconstituter(ikh);
if (reconstituter.get_error() != JVMTI_ERROR_NONE) {