--- a/src/hotspot/share/prims/jvmtiEnvBase.cpp Mon Oct 07 13:56:11 2019 -0700
+++ b/src/hotspot/share/prims/jvmtiEnvBase.cpp Mon Oct 07 18:44:53 2019 -0400
@@ -659,10 +659,9 @@
// thread is not doing an Object.wait() call
mon = java_thread->current_pending_monitor();
if (mon != NULL) {
- // The thread is trying to enter() or raw_enter() an ObjectMonitor.
+ // The thread is trying to enter() an ObjectMonitor.
obj = (oop)mon->object();
- // If obj == NULL, then ObjectMonitor is raw which doesn't count
- // as contended for this API
+ assert(obj != NULL, "ObjectMonitor should have a valid object!");
}
// implied else: no contended ObjectMonitor
} else {