[Bug 374367] NPE in QueuedThreadPool.dump() with early java6 jvms

This commit is contained in:
Jesse McConnell 2012-03-16 14:52:49 -05:00
parent ec2ccec766
commit d717be1450
1 changed files with 8 additions and 4 deletions

View File

@ -465,6 +465,9 @@ public class QueuedThreadPool extends AbstractLifeCycle implements SizedThreadPo
{
final StackTraceElement[] trace=thread.getStackTrace();
boolean inIdleJobPoll=false;
// trace can be null on early java 6 jvms
if (trace != null)
{
for (StackTraceElement t : trace)
{
if ("idleJobPoll".equals(t.getMethodName()))
@ -473,6 +476,7 @@ public class QueuedThreadPool extends AbstractLifeCycle implements SizedThreadPo
break;
}
}
}
final boolean idle=inIdleJobPoll;
if (_detailedDump)