mirror of https://github.com/apache/lucene.git
Add null check to avoid NPE during JMX registration
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@708824 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a61286806e
commit
2cc8be768a
|
@ -189,6 +189,7 @@ public class FastLRUCache implements SolrCache {
|
|||
|
||||
public NamedList getStatistics() {
|
||||
NamedList<Serializable> lst = new SimpleOrderedMap<Serializable>();
|
||||
if (cache == null) return lst;
|
||||
ConcurrentLRUCache.Stats stats = cache.getStats();
|
||||
long lookups = stats.getCumulativeLookups();
|
||||
long hits = stats.getCumulativeHits();
|
||||
|
|
Loading…
Reference in New Issue