Skip to content

Commit

Permalink
Move fetching the Oop to inside the else block.
Browse files Browse the repository at this point in the history
  • Loading branch information
plummercj committed Aug 21, 2023
1 parent a3f3f0e commit 410bce0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ private static void dumpMonitor(PrintStream tty, ObjectMonitor mon, boolean raw)
tty.println();
tty.println(" _header: 0x" + Long.toHexString(mon.header().value()));
OopHandle obj = mon.object();
Oop oop = heap.newOop(obj);
if (obj == null) {
tty.println(" _object: null");
} else {
Oop oop = heap.newOop(obj);
tty.println(" _object: " + obj + ", a " + oop.getKlass().getName().asString());
}
Address owner = mon.owner();
Expand Down

0 comments on commit 410bce0

Please sign in to comment.