lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject svn commit: r1291184 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java
Date Mon, 20 Feb 2012 10:34:06 GMT
Author: siren
Date: Mon Feb 20 10:34:06 2012
New Revision: 1291184

URL: http://svn.apache.org/viewvc?rev=1291184&view=rev
Log:
SOLR-3068: add check against nulls

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1291184&r1=1291183&r2=1291184&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Mon Feb 20 10:34:06 2012
@@ -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)
 

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java?rev=1291184&r1=1291183&r2=1291184&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java
(original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java
Mon Feb 20 10:34:06 2012
@@ -62,7 +62,9 @@ public class ThreadDumpHandler extends R
       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 R
     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);



Mime
View raw message