Name: rmT116609 Date: 04/27/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Following program
import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
import java.lang.management.ThreadMBean;
import java.lang.management.ThreadState;
public class Main
{
public static void main(String []args) {
ThreadMBean mbean = ManagementFactory.getThreadMBean();
ThreadInfo threadInfo = mbean.getThreadInfo(3);
System.out.println(threadInfo);
}
}
produces
Thread Finalizer (Id = 3) Waitingjava.lang.ref.ReferenceQueue$Lock@11b86e7
I think you just need to put a space between getThreadState() and getLockName() in ThreadInfo.toString().
Also, be aware that getLockName() also may be null
REPRODUCIBILITY :
This bug can be reproduced always.
(Incident Review ID: 259992)
======================================================================
- duplicates
-
JDK-5042981 Threadinfo.toString() should gather stack trace details
-
- Closed
-