SOLR-9195: remove unnecessary allocation and null check in UpdateRequestProcessorChain.getReqProcessors

This commit is contained in:
Christine Poerschke 2016-06-15 12:11:02 +01:00
parent 87016b5f0c
commit 651499c82d
2 changed files with 14 additions and 11 deletions

View File

@ -76,6 +76,12 @@ Bug Fixes
* SOLR-9161: Change SolrPluginUtils.invokeSetters implementation to accommodate setter variants.
(Christine Poerschke, Steve Rowe, Uwe Schindler)
Other Changes
----------------------
* SOLR-9195: Remove unnecessary allocation and null check in UpdateRequestProcessorChain's
getReqProcessors method. (Christine Poerschke)
================== 6.1.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

View File

@ -265,9 +265,7 @@ public final class UpdateRequestProcessorChain implements PluginInfoInitialized
static List<UpdateRequestProcessorFactory> getReqProcessors(String processor, SolrCore core) {
if (processor == null) return Collections.EMPTY_LIST;
List<UpdateRequestProcessorFactory> result = new ArrayList<>();
if (processor != null) {
List<String> names = StrUtils.splitSmart(processor, ',');
List<UpdateRequestProcessorFactory> l = new ArrayList<>(names.size());
for (String s : names) {
s = s.trim();
if (s.isEmpty()) continue;
@ -276,7 +274,6 @@ public final class UpdateRequestProcessorChain implements PluginInfoInitialized
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "No such processor " + s);
result.add(p);
}
}
return result;
}