--- old/src/hotspot/share/prims/jvmtiEnvBase.cpp 2019-10-03 23:47:55.887242612 -0400 +++ new/src/hotspot/share/prims/jvmtiEnvBase.cpp 2019-10-03 23:47:54.774231200 -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 {