You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2016/06/15 13:38:08 UTC
lucene-solr:master: SOLR-9195: remove unnecessary allocation and null
check in UpdateRequestProcessorChain.getReqProcessors
Repository: lucene-solr
Updated Branches:
refs/heads/master 87016b5f0 -> 651499c82
SOLR-9195: remove unnecessary allocation and null check in UpdateRequestProcessorChain.getReqProcessors
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/651499c8
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/651499c8
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/651499c8
Branch: refs/heads/master
Commit: 651499c82df482b493b0ed166c2ab7196af0a794
Parents: 87016b5
Author: Christine Poerschke <cp...@apache.org>
Authored: Wed Jun 15 12:11:02 2016 +0100
Committer: Christine Poerschke <cp...@apache.org>
Committed: Wed Jun 15 12:12:23 2016 +0100
----------------------------------------------------------------------
solr/CHANGES.txt | 6 ++++++
.../processor/UpdateRequestProcessorChain.java | 19 ++++++++-----------
2 files changed, 14 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/651499c8/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 5601791..5286ab6 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -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.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/651499c8/solr/core/src/java/org/apache/solr/update/processor/UpdateRequestProcessorChain.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/processor/UpdateRequestProcessorChain.java b/solr/core/src/java/org/apache/solr/update/processor/UpdateRequestProcessorChain.java
index 5efcb95..bd23b4b 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/UpdateRequestProcessorChain.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/UpdateRequestProcessorChain.java
@@ -265,17 +265,14 @@ 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;
- UpdateRequestProcessorFactory p = core.getUpdateProcessors().get(s);
- if (p == null)
- throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "No such processor " + s);
- result.add(p);
- }
+ List<String> names = StrUtils.splitSmart(processor, ',');
+ for (String s : names) {
+ s = s.trim();
+ if (s.isEmpty()) continue;
+ UpdateRequestProcessorFactory p = core.getUpdateProcessors().get(s);
+ if (p == null)
+ throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "No such processor " + s);
+ result.add(p);
}
return result;
}