Skip to content

Apache Lucene open-source search software

SOLR-13515: remove SolrPluginUtils.IdentityRegenerator in favour of NoOpRegenerator

Christine Poerschke335aaf801edd
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 41b29f9279d..370482da157 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -73,6 +73,9 @@ Upgrade Notes
4lw.commands.whitelist=* to enable all ZooKeeper "4 letter commands".
(Erick Erickson)
+* SOLR-13515: org.apache.solr.util.SolrPluginUtils.IdentityRegenerator has been removed, please use
+ the identical org.apache.solr.search.NoOpRegenerator instead. (David Smiley, Christine Poerschke)
+
New Features
----------------------
diff --git a/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java b/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java
index 02b253e1b14..2807ad652e2 100644
--- a/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java
+++ b/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java
@@ -63,7 +63,6 @@ import org.apache.solr.request.json.RequestUtil;
import org.apache.solr.response.SolrQueryResponse;
import org.apache.solr.schema.IndexSchema;
import org.apache.solr.schema.SchemaField;
-import org.apache.solr.search.CacheRegenerator;
import org.apache.solr.search.DocIterator;
import org.apache.solr.search.DocList;
import org.apache.solr.search.DocSet;
@@ -71,7 +70,6 @@ import org.apache.solr.search.FieldParams;
import org.apache.solr.search.QParser;
import org.apache.solr.search.QueryParsing;
import org.apache.solr.search.ReturnFields;
-import org.apache.solr.search.SolrCache;
import org.apache.solr.search.SolrIndexSearcher;
import org.apache.solr.search.SolrQueryParser;
import org.apache.solr.search.SortSpecParsing;
@@ -974,28 +972,6 @@ public class SolrPluginUtils {
return out;
}
- /**
- * A CacheRegenerator that can be used whenever the items in the cache
- * are not dependant on the current searcher.
- *
- * <p>
- * Flat out copies the oldKey=&gt;oldVal pair into the newCache
- * </p>
- */
- public static class IdentityRegenerator implements CacheRegenerator {
- @Override
- public boolean regenerateItem(SolrIndexSearcher newSearcher,
- SolrCache newCache,
- SolrCache oldCache,
- Object oldKey,
- Object oldVal)
- throws IOException {
-
- newCache.put(oldKey,oldVal);
- return true;
- }
- }
-
public static void invokeSetters(Object bean, Iterable<Map.Entry<String,Object>> initArgs) {
invokeSetters(bean, initArgs, false);
}