RFR 8031701: java/lang/management/ThreadMXBean/Locks.java: Thread WaitingThread is expected to wait on Object but got null Thread.State = RUNNABLE

Mandy Chung mandy.chung at oracle.com
Tue Jan 28 15:50:28 PST 2014


Hi Jaroslav,

On 1/21/14 7:50 AM, Jaroslav Bachorik wrote:
> Please, review the following test fix.
>
> Issue : https://bugs.openjdk.java.net/browse/JDK-8031701
> Webrev: http://cr.openjdk.java.net/~jbachorik/8031701/webrev.00
>

The change looks okay.  I like the new assertNoLock method and as you 
indicate in the comment in L54-55 that the thread state is dummy and not 
verified, would it worth refactor checkBlockedObject?  The comment "// 
#blocking#1", "// #waiting#1", etc are little confusing - maybe "phase 
1", "phase 2", etc?

line 279 - leftover comment can be removed.  Since you are here, can you 
add a space after "==" in line 68 "==Thread.State.BLOCKED"

thanks
Mandy


More information about the serviceability-dev mailing list