diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 6e4ec99b74b..ad286c3c95b 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -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) diff --git a/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java index a39d63c568a..7313be09413 100644 --- a/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java @@ -62,7 +62,9 @@ public class ThreadDumpHandler extends RequestHandlerBase tinfos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE); NamedList> lst = new NamedList>(); 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> lst = new NamedList>(); 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);