From f91b957e52564ec5dddbeb73ee0c18578a308718 Mon Sep 17 00:00:00 2001 From: Noble Paul Date: Thu, 11 Sep 2014 02:08:13 +0000 Subject: [PATCH] SOLR-6499 git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1624181 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/solr/core/RequestHandlers.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/solr/core/src/java/org/apache/solr/core/RequestHandlers.java b/solr/core/src/java/org/apache/solr/core/RequestHandlers.java index 4c8068efff1..8c4cb3ac647 100644 --- a/solr/core/src/java/org/apache/solr/core/RequestHandlers.java +++ b/solr/core/src/java/org/apache/solr/core/RequestHandlers.java @@ -142,7 +142,12 @@ public final class RequestHandlers { void initHandlersFromConfig(SolrConfig config, List implicits){ // use link map so we iterate in the same order Map handlers = new LinkedHashMap<>(); - ArrayList infos = new ArrayList<>(implicits); + Map implicitInfoMap= new HashMap<>(); + //deduping implicit and explicit requesthandlers + for (PluginInfo info : implicits) implicitInfoMap.put(info.name,info); + for (PluginInfo info : config.getPluginInfos(SolrRequestHandler.class.getName())) + if(implicitInfoMap.containsKey(info.name)) implicitInfoMap.remove(info.name); + ArrayList infos = new ArrayList<>(implicitInfoMap.values()); infos.addAll(config.getPluginInfos(SolrRequestHandler.class.getName())); for (PluginInfo info : infos) { try {