Small fix -- a null or empty name is not allowed in JMX. Don't put a name to info mbean if it is not supplied.

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@688705 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2008-08-25 12:34:10 +00:00
parent f207fcaf90
commit 668fc13a82
1 changed files with 3 additions and 1 deletions

View File

@ -184,7 +184,9 @@ public class JmxMonitoredMap<K, V> extends
throws MalformedObjectNameException {
Hashtable<String, String> map = new Hashtable<String, String>();
map.put("type", key);
map.put("id", infoBean.getName());
if (infoBean.getName() != null && !"".equals(infoBean.getName())) {
map.put("id", infoBean.getName());
}
return ObjectName.getInstance(jmxRootName, map);
}