NPE occurs in ThreadMXBean.getThreadInfo, both in 5.0u10 and 6.0fcs.
CONFIGURATION :
CPU : Intel(R) Xeon(TM) CPU 2.40GHz * 2
Mem : 2GB
OS :Red Hat Enterprise Linux AS release 3 (Taroon Update 5)
( Linux kronos 2.4.21-32.ELsmp #1 SMP Fri Apr 15 21:17:59 EDT 2005 i686 i686 i386 GNU/Linux )
REPRODUCE :
1. unfold the attached test1.tgz
2. Go to test1 directory and invoke
java -Xmx3m -Djava.library.path=native_LINUX Main
You will see the following message.
-------
kronos[14]% java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)
tbaba@kronos[15]% java -Xmx3m -Djava.library.path=native_LINUX Main
java.lang.NullPointerException
at java.lang.String.<init>(String.java:176)
at java.lang.String.valueOf(String.java:2841)
at java.lang.Thread.getName(Thread.java:1061)
at java.lang.management.ThreadInfo.initialize(ThreadInfo.java:231)
at java.lang.management.ThreadInfo.<init>(ThreadInfo.java:112)
at sun.management.ThreadImpl.getThreadInfo0(Native Method)
at sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:147)
at sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:107)
at Main.main(Main.java:15)
kronos[16]%