@@ -276,9 +276,9 @@ bool ObjectMonitor::enter(TRAPS) {
276276 if (TrySpin (Self) > 0 ) {
277277 assert (_owner == Self, " must be Self: owner=" INTPTR_FORMAT, p2i (_owner));
278278 assert (_recursions == 0 , " must be 0: recursions=" INTX_FORMAT, _recursions);
279- assert (((oop) object () )->mark () == markWord::encode (this ),
279+ assert (object ()->mark () == markWord::encode (this ),
280280 " object mark must match encoded this: mark=" INTPTR_FORMAT
281- " , encoded this=" INTPTR_FORMAT, ((oop) object () )->mark ().value (),
281+ " , encoded this=" INTPTR_FORMAT, object ()->mark ().value (),
282282 markWord::encode (this ).value ());
283283 Self->_Stalled = 0 ;
284284 return true ;
@@ -296,7 +296,7 @@ bool ObjectMonitor::enter(TRAPS) {
296296 // Async deflation is in progress and our contentions increment
297297 // above lost the race to async deflation. Undo the work and
298298 // force the caller to retry.
299- const oop l_object = (oop) object ();
299+ const oop l_object = object ();
300300 if (l_object != NULL ) {
301301 // Attempt to restore the header/dmw to the object's header so that
302302 // we only retry once if the deflater thread happens to be slow.
@@ -310,8 +310,8 @@ bool ObjectMonitor::enter(TRAPS) {
310310 JFR_ONLY (JfrConditionalFlushWithStacktrace<EventJavaMonitorEnter> flush (jt);)
311311 EventJavaMonitorEnter event;
312312 if (event.should_commit ()) {
313- event.set_monitorClass (((oop) this -> object () )->klass ());
314- event.set_address ((uintptr_t )( this -> object_addr () ));
313+ event.set_monitorClass (object ()->klass ());
314+ event.set_address ((uintptr_t )object_addr ());
315315 }
316316
317317 { // Change java thread status to indicate blocked on monitor enter.
@@ -374,7 +374,7 @@ bool ObjectMonitor::enter(TRAPS) {
374374 assert (_recursions == 0 , " invariant" );
375375 assert (_owner == Self, " invariant" );
376376 assert (_succ != Self, " invariant" );
377- assert (((oop)( object ()) )->mark () == markWord::encode (this ), " invariant" );
377+ assert (object ()->mark () == markWord::encode (this ), " invariant" );
378378
379379 // The thread -- now the owner -- is back in vm mode.
380380 // Report the glorious news via TI,DTrace and jvmstat.
@@ -446,7 +446,7 @@ void ObjectMonitor::install_displaced_markword_in_object(const oop obj) {
446446 OrderAccess::loadload ();
447447 }
448448
449- const oop l_object = (oop) object ();
449+ const oop l_object = object ();
450450 if (l_object == NULL ) {
451451 // ObjectMonitor's object ref has already been cleared by async
452452 // deflation so we're done here.
@@ -770,7 +770,7 @@ void ObjectMonitor::ReenterI(Thread * Self, ObjectWaiter * SelfNode) {
770770 assert (SelfNode != NULL , " invariant" );
771771 assert (SelfNode->_thread == Self, " invariant" );
772772 assert (_waiters > 0 , " invariant" );
773- assert (((oop)( object ()) )->mark () == markWord::encode (this ), " invariant" );
773+ assert (object ()->mark () == markWord::encode (this ), " invariant" );
774774
775775 JavaThread * jt = Self->as_Java_thread ();
776776 assert (jt->thread_state () != _thread_blocked, " invariant" );
@@ -839,7 +839,7 @@ void ObjectMonitor::ReenterI(Thread * Self, ObjectWaiter * SelfNode) {
839839 // In addition, Self.TState is stable.
840840
841841 assert (_owner == Self, " invariant" );
842- assert (((oop)( object ()) )->mark () == markWord::encode (this ), " invariant" );
842+ assert (object ()->mark () == markWord::encode (this ), " invariant" );
843843 UnlinkAfterAcquire (Self, SelfNode);
844844 if (_succ == Self) _succ = NULL ;
845845 assert (_succ != Self, " invariant" );
@@ -1301,7 +1301,7 @@ static void post_monitor_wait_event(EventJavaMonitorWait* event,
13011301 bool timedout) {
13021302 assert (event != NULL , " invariant" );
13031303 assert (monitor != NULL , " invariant" );
1304- event->set_monitorClass (((oop) monitor->object () )->klass ());
1304+ event->set_monitorClass (monitor->object ()->klass ());
13051305 event->set_timeout (timeout);
13061306 event->set_address ((uintptr_t )monitor->object_addr ());
13071307 event->set_notifier (notifier_tid);
@@ -1519,7 +1519,7 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) {
15191519 // Verify a few postconditions
15201520 assert (_owner == Self, " invariant" );
15211521 assert (_succ != Self, " invariant" );
1522- assert (((oop)( object ()) )->mark () == markWord::encode (this ), " invariant" );
1522+ assert (object ()->mark () == markWord::encode (this ), " invariant" );
15231523
15241524 // check if the notification happened
15251525 if (!WasNotified) {
@@ -2103,7 +2103,7 @@ void ObjectMonitor::print() const { print_on(tty); }
21032103void ObjectMonitor::print_debug_style_on (outputStream* st) const {
21042104 st->print_cr (" (ObjectMonitor*) " INTPTR_FORMAT " = {" , p2i (this ));
21052105 st->print_cr (" _header = " INTPTR_FORMAT, header ().value ());
2106- st->print_cr (" _object = " INTPTR_FORMAT, p2i (_object ));
2106+ st->print_cr (" _object = " INTPTR_FORMAT, p2i (object () ));
21072107 st->print (" _allocation_state = " );
21082108 if (is_free ()) {
21092109 st->print (" Free" );
0 commit comments