mirror of https://github.com/apache/lucene.git
empty collectioons should use Collections.emptyXXX()
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@807103 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c13a6f0208
commit
8b9071efb3
|
@ -241,7 +241,9 @@ public class SolrConfig extends Config {
|
|||
}
|
||||
}
|
||||
|
||||
return Collections.unmodifiableMap(chains);
|
||||
return chains.isEmpty() ?
|
||||
Collections.<String, List<PluginInfo>>emptyMap():
|
||||
Collections.unmodifiableMap(chains);
|
||||
}
|
||||
private PluginInfo loadSinglePlugin(String tag){
|
||||
NodeList nodes = (NodeList) evaluate(tag, XPathConstants.NODESET);
|
||||
|
@ -257,7 +259,9 @@ public class SolrConfig extends Config {
|
|||
for (int i=0; i<nodes.getLength(); i++) {
|
||||
result.add(new PluginInfo(nodes.item(i) ,"[solrconfig.xml] "+tag,requireName));
|
||||
}
|
||||
return Collections.unmodifiableList(result) ;
|
||||
return result.isEmpty() ?
|
||||
Collections.<PluginInfo>emptyList() :
|
||||
Collections.unmodifiableList(result) ;
|
||||
}
|
||||
|
||||
/* The set of materialized parameters: */
|
||||
|
|
Loading…
Reference in New Issue