SOLR-3068: add check against nulls

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1291184 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sami Siren 2012-02-20 10:34:06 +00:00
parent b64c42c533
commit 83f02d630b
2 changed files with 8 additions and 2 deletions

View File

@ -256,6 +256,8 @@ Optimizations
Bug Fixes
----------------------
* SOLR-3068: Occasional NPE in ThreadDumpHandler (siren)
* SOLR-2762: FSTLookup could return duplicate results or one results less
than requested. (David Smiley, Dawid Weiss)

View File

@ -62,7 +62,9 @@ public class ThreadDumpHandler extends RequestHandlerBase
tinfos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE);
NamedList<SimpleOrderedMap<Object>> lst = new NamedList<SimpleOrderedMap<Object>>();
for (ThreadInfo ti : tinfos) {
lst.add( "thread", getThreadInfo( ti, tmbean ) );
if (ti != null) {
lst.add( "thread", getThreadInfo( ti, tmbean ) );
}
}
system.add( "deadlocks", lst );
}
@ -72,7 +74,9 @@ public class ThreadDumpHandler extends RequestHandlerBase
tinfos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE);
NamedList<SimpleOrderedMap<Object>> lst = new NamedList<SimpleOrderedMap<Object>>();
for (ThreadInfo ti : tinfos) {
lst.add( "thread", getThreadInfo( ti, tmbean ) );
if (ti != null) {
lst.add( "thread", getThreadInfo( ti, tmbean ) );
}
}
system.add( "threadDump", lst );
rsp.setHttpCaching(false);