simple null check: SolrCore isn't garunteed to havea CoreDescriptor, and CoreDescriptor doesn't have to have a CoreContainer

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@937529 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2010-04-23 21:43:41 +00:00
parent c32bb32ce1
commit 01def23422
1 changed files with 4 additions and 1 deletions

View File

@ -1626,7 +1626,10 @@ public final class SolrCore implements SolrInfoMBean {
lst.add("coreName", name==null ? "(null)" : name);
lst.add("startTime", new Date(startTime));
lst.add("refCount", getOpenCount());
lst.add("aliases", getCoreDescriptor().getCoreContainer().getCoreNames(this));
if (null != getCoreDescriptor() && null != getCoreDescriptor().getCoreContainer()) {
lst.add("aliases", getCoreDescriptor().getCoreContainer().getCoreNames(this));
}
return lst;
}