Apache Lucene open-source search software
SOLR-8764: Remove deprecated methods and classes
Steve Rowe9427b7402da3
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 6eaf862a00c..cf85ec5610f 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -352,6 +352,8 @@ Other Changes* SOLR-8758: Add a new SolrCloudTestCase class, using MiniSolrCloudCluster (AlanWoodward)++* SOLR-8764: Remove all deprecated methods and classes from master prior to the 6.0 release. (Steve Rowe)================== 5.5.1 ==================diff --git a/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotParams.java b/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotParams.javaindex 42ff8da8402..71a22fe9343 100644--- a/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotParams.java+++ b/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotParams.java@@ -46,14 +46,7 @@ public final class CarrotParams {public static String LANGUAGE_CODE_MAP = CARROT_PREFIX + "lcmap";/**- * Use {@link #RESOURCES_DIR}.- */- @Deprecated- public static String LEXICAL_RESOURCES_DIR = CARROT_PREFIX + "lexicalResourcesDir";-- /**- * A replacement property pointing to Carrot<sup>2</sup> resources- * (a more generic version of the deprecated {@link #LEXICAL_RESOURCES_DIR}).+ * Points to Carrot<sup>2</sup> resources*/public static String RESOURCES_DIR = CARROT_PREFIX + "resourcesDir";@@ -72,7 +65,6 @@ public final class CarrotParams {NUM_DESCRIPTIONS,OUTPUT_SUB_CLUSTERS,- LEXICAL_RESOURCES_DIR,RESOURCES_DIR,LANGUAGE_CODE_MAP);diff --git a/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/SolrResourceLocator.java b/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/SolrResourceLocator.javaindex b0783022d7d..2cc67993a2e 100644--- a/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/SolrResourceLocator.java+++ b/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/SolrResourceLocator.java@@ -45,10 +45,8 @@ class SolrResourceLocator implements IResourceLocator {public SolrResourceLocator(SolrCore core, SolrParams initParams) {resourceLoader = core.getResourceLoader();- @SuppressWarnings("deprecation")- String lexicalResourcesDir = initParams.get(CarrotParams.LEXICAL_RESOURCES_DIR);String resourcesDir = initParams.get(CarrotParams.RESOURCES_DIR);- carrot2ResourcesDir = firstNonNull(resourcesDir, lexicalResourcesDir, CarrotClusteringEngine.CARROT_RESOURCES_PREFIX);+ carrot2ResourcesDir = firstNonNull(resourcesDir, CarrotClusteringEngine.CARROT_RESOURCES_PREFIX);}@SuppressWarnings("unchecked")diff --git a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xmlindex 7b2bd46c81e..be629d80c0d 100644--- a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml+++ b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/solrconfig.xml@@ -347,11 +347,6 @@<str name="carrot.algorithm">org.apache.solr.handler.clustering.carrot2.LexicalResourcesCheckClusteringAlgorithm</str><str name="carrot.resourcesDir">clustering/custom</str></lst>- <lst name="engine">- <str name="name">lexical-resource-check-custom-resource-dir-deprecated</str>- <str name="carrot.algorithm">org.apache.solr.handler.clustering.carrot2.LexicalResourcesCheckClusteringAlgorithm</str>- <str name="carrot.lexicalResourcesDir">clustering/custom</str>- </lst><lst name="engine"><str name="name">custom-duplicating-tokenizer</str><str name="carrot.algorithm">org.apache.solr.handler.clustering.carrot2.EchoTokensClusteringAlgorithm</str>diff --git a/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java b/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.javaindex 302247f39e7..752570de3c1 100644--- a/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java+++ b/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java@@ -199,12 +199,6 @@ public class CarrotClusteringEngineTest extends AbstractClusteringTestCase {"online,customsolrstopwordcustomdir,customsolrstoplabelcustomdir");}- @Test- public void testLexicalResourcesFromSolrConfigCustomDirDeprecated() throws Exception {- checkLexicalResourcesFromSolrConfig("lexical-resource-check-custom-resource-dir-deprecated",- "online,customsolrstopwordcustomdir,customsolrstoplabelcustomdir");- }-private void checkLexicalResourcesFromSolrConfig(String engineName, String wordsToCheck)throws IOException {ModifiableSolrParams params = new ModifiableSolrParams();diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.javaindex c88c5775b8c..6370d24cf27 100644--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java@@ -318,22 +318,10 @@ public class EntityProcessorWrapper extends EntityProcessor {this.datasource = datasource;}- /** @deprecated will be removed in Solr 6; use {@link #isInitialized()} */- @Deprecated- public boolean isInitalized() {- return initialized;- }-public boolean isInitialized() {return initialized;}- /** @deprecated will be removed in Solr 6; use {@link #setInitialized(boolean)} */- @Deprecated- public void setInitalized(boolean initialized) {- this.initialized = initialized;- }-public void setInitialized(boolean initialized) {this.initialized = initialized;}diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.javaindex b0b30c40214..453f5713709 100644--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java@@ -32,6 +32,7 @@ import org.junit.Test;import java.io.File;import java.nio.file.Files;import java.util.List;+import java.util.Properties;/*** Test for ContentStreamDataSource@@ -173,8 +174,9 @@ public class TestContentStreamDataSource extends AbstractDataImportHandlerTestCa}private JettySolrRunner createJetty(SolrInstance instance) throws Exception {- System.setProperty("solr.data.dir", instance.getDataDir());- JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), buildJettyConfig("/solr"));+ Properties nodeProperties = new Properties();+ nodeProperties.setProperty("solr.data.dir", instance.getDataDir());+ JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), nodeProperties, buildJettyConfig("/solr"));jetty.start();return jetty;}diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.javaindex 1253f1643e9..abefc493f6b 100644--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorEndToEnd.java@@ -38,6 +38,7 @@ import java.util.HashMap;import java.util.List;import java.util.Map;import java.util.Map.Entry;+import java.util.Properties;/*** End-to-end test of SolrEntityProcessor. "Real" test using embedded Solr@@ -340,8 +341,9 @@ public class TestSolrEntityProcessorEndToEnd extends AbstractDataImportHandlerTe}private JettySolrRunner createJetty(SolrInstance instance) throws Exception {- JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), buildJettyConfig("/solr"));- jetty.setDataDir(instance.getDataDir());+ Properties nodeProperties = new Properties();+ nodeProperties.setProperty("solr.data.dir", instance.getDataDir());+ JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), nodeProperties, buildJettyConfig("/solr"));jetty.start();return jetty;}diff --git a/solr/contrib/uima/src/test/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java b/solr/contrib/uima/src/test/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.javaindex 95feb365fa0..5879c78e212 100644--- a/solr/contrib/uima/src/test/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java+++ b/solr/contrib/uima/src/test/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java@@ -65,8 +65,7 @@ public class UIMAUpdateRequestProcessorTest extends SolrTestCaseJ4 {SolrCore core = h.getCore();UpdateRequestProcessorChain chained = core.getUpdateProcessingChain("uima");assertNotNull(chained);- UIMAUpdateRequestProcessorFactory factory = (UIMAUpdateRequestProcessorFactory) chained- .getFactories()[0];+ UIMAUpdateRequestProcessorFactory factory = (UIMAUpdateRequestProcessorFactory)chained.getProcessors().get(0);assertNotNull(factory);UpdateRequestProcessor processor = factory.getInstance(req(), null, null);assertTrue(processor instanceof UIMAUpdateRequestProcessor);@@ -77,8 +76,7 @@ public class UIMAUpdateRequestProcessorTest extends SolrTestCaseJ4 {SolrCore core = h.getCore();UpdateRequestProcessorChain chained = core.getUpdateProcessingChain("uima-multi-map");assertNotNull(chained);- UIMAUpdateRequestProcessorFactory factory = (UIMAUpdateRequestProcessorFactory) chained- .getFactories()[0];+ UIMAUpdateRequestProcessorFactory factory = (UIMAUpdateRequestProcessorFactory)chained.getProcessors().get(0);assertNotNull(factory);UpdateRequestProcessor processor = factory.getInstance(req(), null, null);assertTrue(processor instanceof UIMAUpdateRequestProcessor);diff --git a/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java b/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.javaindex 02954c4d4c3..88ea5677aef 100644--- a/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java+++ b/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java@@ -114,13 +114,6 @@ public class JettySolrRunner {}- private static Properties defaultNodeProperties(String solrconfigFilename, String schemaFilename) {- Properties props = new Properties();- props.setProperty("solrconfig", solrconfigFilename);- props.setProperty("schema", schemaFilename);- return props;- }-/*** Create a new JettySolrRunner.*@@ -134,82 +127,6 @@ public class JettySolrRunner {this(solrHome, JettyConfig.builder().setContext(context).setPort(port).build());}- /**- * @deprecated use {@link #JettySolrRunner(String,Properties,JettyConfig)}- */- @Deprecated- public JettySolrRunner(String solrHome, String context, int port, String solrConfigFilename, String schemaFileName) {- this(solrHome, defaultNodeProperties(solrConfigFilename, schemaFileName), JettyConfig.builder()- .setContext(context)- .setPort(port)- .build());- }-- /**- * @deprecated use {@link #JettySolrRunner(String,Properties,JettyConfig)}- */- @Deprecated- public JettySolrRunner(String solrHome, String context, int port,- String solrConfigFilename, String schemaFileName, boolean stopAtShutdown) {- this(solrHome, defaultNodeProperties(solrConfigFilename, schemaFileName),- JettyConfig.builder()- .setContext(context)- .setPort(port)- .stopAtShutdown(stopAtShutdown)- .build());- }-- /**- * Constructor taking an ordered list of additional (servlet holder -> path spec) mappings- * to add to the servlet context- * @deprecated use {@link JettySolrRunner#JettySolrRunner(String,Properties,JettyConfig)}- */- @Deprecated- public JettySolrRunner(String solrHome, String context, int port,- String solrConfigFilename, String schemaFileName, boolean stopAtShutdown,- SortedMap<ServletHolder,String> extraServlets) {- this(solrHome, defaultNodeProperties(solrConfigFilename, schemaFileName),- JettyConfig.builder()- .setContext(context)- .setPort(port)- .stopAtShutdown(stopAtShutdown)- .withServlets(extraServlets)- .build());- }-- /**- * @deprecated use {@link #JettySolrRunner(String,Properties,JettyConfig)}- */- @Deprecated- public JettySolrRunner(String solrHome, String context, int port, String solrConfigFilename, String schemaFileName,- boolean stopAtShutdown, SortedMap<ServletHolder, String> extraServlets, SSLConfig sslConfig) {- this(solrHome, defaultNodeProperties(solrConfigFilename, schemaFileName),- JettyConfig.builder()- .setContext(context)- .setPort(port)- .stopAtShutdown(stopAtShutdown)- .withServlets(extraServlets)- .withSSLConfig(sslConfig)- .build());- }-- /**- * @deprecated use {@link #JettySolrRunner(String,Properties,JettyConfig)}- */- @Deprecated- public JettySolrRunner(String solrHome, String context, int port, String solrConfigFilename, String schemaFileName,- boolean stopAtShutdown, SortedMap<ServletHolder, String> extraServlets, SSLConfig sslConfig,- SortedMap<Class<? extends Filter>, String> extraRequestFilters) {- this(solrHome, defaultNodeProperties(solrConfigFilename, schemaFileName),- JettyConfig.builder()- .setContext(context)- .setPort(port)- .stopAtShutdown(stopAtShutdown)- .withServlets(extraServlets)- .withFilters(extraRequestFilters)- .withSSLConfig(sslConfig)- .build());- }/*** Construct a JettySolrRunner@@ -552,42 +469,17 @@ public class JettySolrRunner {}/**- * @deprecated set properties in the Properties passed to the constructor- */- @Deprecated- public void setShards(String shardList) {- nodeProperties.setProperty("shard", shardList);- }-- /**- * @deprecated set properties in the Properties passed to the constructor- */- @Deprecated- public void setDataDir(String dataDir) {- nodeProperties.setProperty("solr.data.dir", dataDir);- }-- /**- * @deprecated set properties in the Properties passed to the constructor- */- @Deprecated- public void setUlogDir(String ulogDir) {- nodeProperties.setProperty("solr.ulog.dir", ulogDir);- }-- /**- * @deprecated set properties in the Properties passed to the constructor+ * @return the Solr home directory of this JettySolrRunner*/- @Deprecated- public void setCoreNodeName(String coreNodeName) {- nodeProperties.setProperty("coreNodeName", coreNodeName);+ public String getSolrHome() {+ return solrHome;}/**- * @return the Solr home directory of this JettySolrRunner+ * @return this node's properties*/- public String getSolrHome() {- return solrHome;+ public Properties getNodeProperties() {+ return nodeProperties;}private void waitForLoadingCoresToFinish(long timeoutMs) {diff --git a/solr/core/src/java/org/apache/solr/core/NodeConfig.java b/solr/core/src/java/org/apache/solr/core/NodeConfig.javaindex 546f27c5f0a..0783355cfe4 100644--- a/solr/core/src/java/org/apache/solr/core/NodeConfig.java+++ b/solr/core/src/java/org/apache/solr/core/NodeConfig.java@@ -106,26 +106,6 @@ public class NodeConfig {return updateShardHandlerConfig;}- @Deprecated- public int getDistributedConnectionTimeout() {- return updateShardHandlerConfig.getDistributedConnectionTimeout();- }-- @Deprecated- public int getDistributedSocketTimeout() {- return updateShardHandlerConfig.getDistributedSocketTimeout();- }-- @Deprecated- public int getMaxUpdateConnections() {- return updateShardHandlerConfig.getMaxUpdateConnections();- }-- @Deprecated- public int getMaxUpdateConnectionsPerHost() {- return updateShardHandlerConfig.getMaxUpdateConnectionsPerHost();- }-public int getCoreLoadThreadCount() {return coreLoadThreads;}diff --git a/solr/core/src/java/org/apache/solr/core/SolrConfig.java b/solr/core/src/java/org/apache/solr/core/SolrConfig.javaindex e66fc7e7404..0b4bac33678 100644--- a/solr/core/src/java/org/apache/solr/core/SolrConfig.java+++ b/solr/core/src/java/org/apache/solr/core/SolrConfig.java@@ -197,7 +197,6 @@ public class SolrConfig extends Config implements MapSerializable {if (hasDeprecatedIndexConfig) {throw new SolrException(ErrorCode.FORBIDDEN, "<indexDefaults> and <mainIndex> configuration sections are discontinued. Use <indexConfig> instead.");} else {- defaultIndexConfig = mainIndexConfig = null;indexConfigPrefix = "indexConfig";}assertWarnOrFail("The <nrtMode> config has been discontinued and NRT mode is always used by Solr." +@@ -214,7 +213,7 @@ public class SolrConfig extends Config implements MapSerializable {);// Parse indexConfig section, using mainIndex as backup in case old config is used- indexConfig = new SolrIndexConfig(this, "indexConfig", mainIndexConfig);+ indexConfig = new SolrIndexConfig(this, "indexConfig", null);booleanQueryMaxClauseCount = getInt("query/maxBooleanClauses", BooleanQuery.getMaxClauseCount());log.info("Using Lucene MatchVersion: " + luceneMatchVersion);@@ -466,11 +465,6 @@ public class SolrConfig extends Config implements MapSerializable {// DocSetpublic final float hashSetInverseLoadFactor;public final int hashDocSetMaxSize;- // default & main index configurations, deprecated as of 3.6- @Deprecated- public final SolrIndexConfig defaultIndexConfig;- @Deprecated- public final SolrIndexConfig mainIndexConfig;// IndexConfig settingspublic final SolrIndexConfig indexConfig;diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.javaindex 5d7ebdce879..06d7da305d8 100644--- a/solr/core/src/java/org/apache/solr/core/SolrCore.java+++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java@@ -166,9 +166,6 @@ public final class SolrCore implements SolrInfoMBean, Closeable {public Date getStartTimeStamp() { return startTime; }- @Deprecated- public long getStartTime() { return startTime.getTime(); }-public long getStartNanoTime() {return startNanoTime;}@@ -641,56 +638,11 @@ public final class SolrCore implements SolrInfoMBean, Closeable {return createReloadedUpdateHandler(className, "Update Handler", updateHandler);}- /**- * Creates a new core and register it in the list of cores.- * If a core with the same name already exists, it will be stopped and replaced by this one.- *- * @param dataDir the index directory- * @param config a solr config instance- * @param schema a solr schema instance- *- * @since solr 1.3- * @deprecated will be removed in the next release- */- public SolrCore(String name, String dataDir, SolrConfig config, IndexSchema schema, CoreDescriptor cd) {- this(name, dataDir, config, schema, null, cd, null, null, null);- }-public SolrCore(CoreDescriptor cd, ConfigSet coreConfig) {this(cd.getName(), null, coreConfig.getSolrConfig(), coreConfig.getIndexSchema(), coreConfig.getProperties(),cd, null, null, null);}- /**- * Creates a new core that is to be loaded lazily. i.e. lazyLoad="true" in solr.xml- *- * @since solr 4.1- * @deprecated will be removed in the next release- */- public SolrCore(String name, CoreDescriptor coreDescriptor) {- this.coreDescriptor = coreDescriptor;- this.setName(name);- this.schema = null;- this.dataDir = null;- this.ulogDir = null;- this.solrConfig = null;- this.configSetProperties = null;- this.maxWarmingSearchers = 2; // we don't have a config yet, just pick a number.- this.slowQueryThresholdMillis = -1;- this.resourceLoader = null;- this.updateHandler = null;- this.isReloaded = true;- this.reqHandlers = null;- this.updateProcessorChains = null;- this.infoRegistry = null;- this.codec = null;- this.ruleExpiryLock = null;- this.memClassLoader = null;- this.directoryFactory = null;- this.solrCoreState = null;- this.restManager = null;- this.solrDelPolicy = null;- }/*** Creates a new core and register it in the list of cores. If a core with thediff --git a/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java b/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.javaindex ad28911e408..89b0180127b 100644--- a/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java@@ -434,23 +434,6 @@ public class MoreLikeThisHandler extends RequestHandlerBasereturn results;}- @Deprecated- public NamedList<DocList> getMoreLikeThese( DocList docs, int rows, int flags ) throws IOException- {- IndexSchema schema = searcher.getSchema();- NamedList<DocList> mlt = new SimpleOrderedMap<>();- DocIterator iterator = docs.iterator();- while( iterator.hasNext() ) {- int id = iterator.nextDoc();-- DocListAndSet sim = getMoreLikeThis( id, 0, rows, null, null, flags );- String name = schema.printableUniqueKey( reader.document( id ) );-- mlt.add(name, sim.docList);- }- return mlt;- }-public NamedList<BooleanQuery> getMoreLikeTheseQuery(DocList docs)throws IOException {IndexSchema schema = searcher.getSchema();diff --git a/solr/core/src/java/org/apache/solr/handler/admin/AdminHandlers.java b/solr/core/src/java/org/apache/solr/handler/admin/AdminHandlers.javadeleted file mode 100644index 1965a505124..00000000000--- a/solr/core/src/java/org/apache/solr/handler/admin/AdminHandlers.java+++ /dev/null@@ -1,151 +0,0 @@-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-package org.apache.solr.handler.admin;--import java.lang.invoke.MethodHandles;-import java.net.URL;-import java.util.Map;--import org.apache.solr.common.SolrException;-import org.apache.solr.common.util.NamedList;-import org.apache.solr.core.SolrCore;-import org.apache.solr.handler.RequestHandlerBase;-import org.apache.solr.request.SolrQueryRequest;-import org.apache.solr.request.SolrRequestHandler;-import org.apache.solr.response.SolrQueryResponse;-import org.apache.solr.util.plugin.SolrCoreAware;-import org.slf4j.Logger;-import org.slf4j.LoggerFactory;--/**- * A special Handler that registers all standard admin handlers- *- * @since solr 1.3- * @deprecated No need to register this request handler. All- * the plugins registered by this class are implicitly registered by the system- */-@Deprecated-public class AdminHandlers extends RequestHandlerBase implements SolrCoreAware-{- private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());- NamedList initArgs = null;-- private static class StandardHandler {- final String name;- final SolrRequestHandler handler;-- public StandardHandler( String n, SolrRequestHandler h )- {- this.name = n;- this.handler = h;- }- }-- /**- * Save the args and pass them to each standard handler- */- @Override- public void init(NamedList args) {- this.initArgs = args;- }-- @Override- public void inform(SolrCore core)- {- String path = null;- path = getPluginInfo().name;- if( path == null ) {- throw new SolrException( SolrException.ErrorCode.SERVER_ERROR,- "The AdminHandler is not registered with the current core." );- }- if( !path.startsWith( "/" ) ) {- throw new SolrException( SolrException.ErrorCode.SERVER_ERROR,- "The AdminHandler needs to be registered to a path. Typically this is '/admin'" );- }- // Remove the parent handler- core.registerRequestHandler(path, null);- if( !path.endsWith( "/" ) ) {- path += "/";- }-- StandardHandler[] list = new StandardHandler[] {- new StandardHandler( "luke", new LukeRequestHandler() ),- new StandardHandler( "system", new SystemInfoHandler() ),- new StandardHandler( "mbeans", new SolrInfoMBeanHandler() ),- new StandardHandler( "plugins", new PluginInfoHandler() ),- new StandardHandler( "threads", new ThreadDumpHandler() ),- new StandardHandler( "properties", new PropertiesRequestHandler() ),- new StandardHandler( "logging", new LoggingHandler() ),- new StandardHandler( "file", new ShowFileRequestHandler() )- };-- for( StandardHandler handler : list ) {- if( core.getRequestHandler( path+handler.name ) == null ) {- handler.handler.init( initArgs );- core.registerRequestHandler( path+handler.name, handler.handler );- if( handler.handler instanceof SolrCoreAware ) {- ((SolrCoreAware)handler.handler).inform(core);- }- }- }- log.warn("<requestHandler name=\"/admin/\" \n class=\"solr.admin.AdminHandlers\" /> is deprecated . It is not required anymore");- }--- @Override- public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) {- throw new SolrException( SolrException.ErrorCode.SERVER_ERROR,- "The AdminHandler should never be called directly" );- }-- //////////////////////// SolrInfoMBeans methods //////////////////////-- @Override- public String getDescription() {- return "Register Standard Admin Handlers";- }-- @Override- public String getVersion() {- return getClass().getPackage().getSpecificationVersion();- }-- @Override- public String getSource() {- return null;- }-- @Override- public Category getCategory() {- return Category.QUERYHANDLER;- }-- @Override- public URL[] getDocs() {- return null;- }-- @Override- public String getName() {- return this.getClass().getName();- }-- @Override- public NamedList getStatistics() {- return null;- }-}diff --git a/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.javaindex 4e497780e6e..0ec6d79fecb 100644--- a/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java@@ -562,13 +562,6 @@ public class LukeRequestHandler extends RequestHandlerBasetypeusemap.put( ft.getTypeName(), v );}- /**- * @deprecated use {@link #getIndexInfo(DirectoryReader)} since you now have to explicitly pass the "fl" prameter- * and this was always called with "false" anyway from CoreAdminHandler- */- public static SimpleOrderedMap<Object> getIndexInfo(DirectoryReader reader, boolean detail) throws IOException {- return getIndexInfo(reader);- }// This method just gets the top-most level of information. This was conflated with getting detailed info// for *all* the fields, called from CoreAdminHandler etc.diff --git a/solr/core/src/java/org/apache/solr/internal/csv/CSVParser.java b/solr/core/src/java/org/apache/solr/internal/csv/CSVParser.javaindex 8d88c372710..ad1aef71f6c 100644--- a/solr/core/src/java/org/apache/solr/internal/csv/CSVParser.java+++ b/solr/core/src/java/org/apache/solr/internal/csv/CSVParser.java@@ -111,41 +111,9 @@ public class CSVParser {* @param input a Reader containing "csv-formatted" input*/public CSVParser(Reader input) {- // note: must match default-CSV-strategy !!- this(input, ',');+ this(input, CSVStrategy.DEFAULT_STRATEGY);}- /**- * Customized value delimiter parser.- *- * The parser follows the default {@link CSVStrategy}- * except for the delimiter setting.- *- * @param input a Reader based on "csv-formatted" input- * @param delimiter a Char used for value separation- * @deprecated use {@link #CSVParser(Reader,CSVStrategy)}.- */- public CSVParser(Reader input, char delimiter) {- this(input, delimiter, '"', CSVStrategy.COMMENTS_DISABLED);- }-- /**- * Customized csv parser.- *- * The parser parses according to the given CSV dialect settings.- * Leading whitespaces are truncated, unicode escapes are- * not interpreted and empty lines are ignored.- *- * @param input a Reader based on "csv-formatted" input- * @param delimiter a Char used for value separation- * @param encapsulator a Char used as value encapsulation marker- * @param commentStart a Char used for comment identification- * @deprecated use {@link #CSVParser(Reader,CSVStrategy)}.- */- public CSVParser(Reader input, char delimiter, char encapsulator, char commentStart) {- this(input, new CSVStrategy(delimiter, encapsulator, commentStart));- }-/*** Customized CSV parser using the given {@link CSVStrategy}*diff --git a/solr/core/src/java/org/apache/solr/internal/csv/CSVStrategy.java b/solr/core/src/java/org/apache/solr/internal/csv/CSVStrategy.javaindex 9273908b0e8..e27c9c37261 100644--- a/solr/core/src/java/org/apache/solr/internal/csv/CSVStrategy.java+++ b/solr/core/src/java/org/apache/solr/internal/csv/CSVStrategy.java@@ -54,7 +54,7 @@ public class CSVStrategy implements Cloneable, Serializable {public CSVStrategy(char delimiter, char encapsulator, char commentStart) {- this(delimiter, encapsulator, commentStart, true, false, true);+ this(delimiter, encapsulator, commentStart, ESCAPE_DISABLED, true, true, false, true);}/**@@ -89,19 +89,6 @@ public class CSVStrategy implements Cloneable, Serializable {setIgnoreEmptyLines(ignoreEmptyLines);}- /** @deprecated Use {@link #CSVStrategy(char, char, char, char, boolean, boolean, boolean, boolean)} */- public CSVStrategy(- char delimiter,- char encapsulator,- char commentStart,- boolean ignoreLeadingWhitespace,- boolean interpretUnicodeEscapes,- boolean ignoreEmptyLines)- {- this(delimiter, encapsulator, commentStart, CSVStrategy.ESCAPE_DISABLED, ignoreLeadingWhitespace,- true, interpretUnicodeEscapes, ignoreEmptyLines);- }-public void setDelimiter(char delimiter) { this.delimiter = delimiter; }public char getDelimiter() { return this.delimiter; }diff --git a/solr/core/src/java/org/apache/solr/parser/CharStream.java b/solr/core/src/java/org/apache/solr/parser/CharStream.javaindex 0400af47e05..9bec5a6e9d5 100644--- a/solr/core/src/java/org/apache/solr/parser/CharStream.java+++ b/solr/core/src/java/org/apache/solr/parser/CharStream.java@@ -27,22 +27,6 @@ interface CharStream {*/char readChar() throws java.io.IOException;- @Deprecated- /**- * Returns the column position of the character last read.- * @deprecated- * @see #getEndColumn- */- int getColumn();-- @Deprecated- /**- * Returns the line number of the character last read.- * @deprecated- * @see #getEndLine- */- int getLine();-/*** Returns the column number of the last character for current token (being* matched after the last call to BeginTOken).diff --git a/solr/core/src/java/org/apache/solr/parser/FastCharStream.java b/solr/core/src/java/org/apache/solr/parser/FastCharStream.javaindex 6a283f20d09..712a28335b5 100644--- a/solr/core/src/java/org/apache/solr/parser/FastCharStream.java+++ b/solr/core/src/java/org/apache/solr/parser/FastCharStream.java@@ -105,14 +105,6 @@ public final class FastCharStream implements CharStream {}}- @Override- public final int getColumn() {- return bufferStart + bufferPosition;- }- @Override- public final int getLine() {- return 1;- }@Overridepublic final int getEndColumn() {return bufferStart + bufferPosition;diff --git a/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java b/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.javaindex c86f69153da..83fd44775f4 100644--- a/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java+++ b/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java@@ -91,8 +91,6 @@ public abstract class AbstractSpatialFieldType<T extends SpatialStrategy> extendprivate final Cache<String, T> fieldStrategyCache = CacheBuilder.newBuilder().build();protected DistanceUnits distanceUnits;- @Deprecated- protected String units; // for back compat; hopefully nullprotected final Set<String> supportedScoreModes;@@ -120,30 +118,11 @@ public abstract class AbstractSpatialFieldType<T extends SpatialStrategy> extendctx = SpatialContextFactory.makeSpatialContext(argsWrap, schema.getResourceLoader().getClassLoader());args.keySet().removeAll(argsWrap.getSeenKeys());}-- final String unitsErrMsg = "units parameter is deprecated, please use distanceUnits instead for field types with class " +- getClass().getSimpleName();- this.units = args.remove("units");//deprecated- if (units != null) {- if ("degrees".equals(units)) {- log.warn(unitsErrMsg);- } else {- throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, unitsErrMsg);- }- }final String distanceUnitsStr = args.remove("distanceUnits");if (distanceUnitsStr == null) {- if (units != null) {- this.distanceUnits = DistanceUnits.BACKCOMPAT;- } else {- this.distanceUnits = ctx.isGeo() ? DistanceUnits.KILOMETERS : DistanceUnits.DEGREES;- }+ this.distanceUnits = ctx.isGeo() ? DistanceUnits.KILOMETERS : DistanceUnits.DEGREES;} else {- // If both units and distanceUnits was specified- if (units != null) {- throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, unitsErrMsg);- }this.distanceUnits = parseDistanceUnits(distanceUnitsStr);if (this.distanceUnits == null)throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,diff --git a/solr/core/src/java/org/apache/solr/schema/RptWithGeometrySpatialField.java b/solr/core/src/java/org/apache/solr/schema/RptWithGeometrySpatialField.javaindex 55fcf73d868..fe4cedc04c5 100644--- a/solr/core/src/java/org/apache/solr/schema/RptWithGeometrySpatialField.java+++ b/solr/core/src/java/org/apache/solr/schema/RptWithGeometrySpatialField.java@@ -68,7 +68,6 @@ public class RptWithGeometrySpatialField extends AbstractSpatialFieldType<ComposrptFieldType.argsParser = argsParser = newSpatialArgsParser();this.ctx = rptFieldType.ctx;this.distanceUnits = rptFieldType.distanceUnits;- this.units = rptFieldType.units;}@Overridediff --git a/solr/core/src/java/org/apache/solr/schema/TrieField.java b/solr/core/src/java/org/apache/solr/schema/TrieField.javaindex b369e999a89..251eb8544d3 100644--- a/solr/core/src/java/org/apache/solr/schema/TrieField.java+++ b/solr/core/src/java/org/apache/solr/schema/TrieField.java@@ -117,23 +117,8 @@ public class TrieField extends PrimitiveFieldType {if (val != null) {return (type == TrieTypes.DATE) ? new Date(val.longValue()) : val;} else {- // the following code is "deprecated" and only to support pre-3.2 indexes using the old BinaryField encoding:- final BytesRef bytes = f.binaryValue();- if (bytes==null) return badFieldString(f);- switch (type) {- case INTEGER:- return toInt(bytes.bytes, bytes.offset);- case FLOAT:- return Float.intBitsToFloat(toInt(bytes.bytes, bytes.offset));- case LONG:- return toLong(bytes.bytes, bytes.offset);- case DOUBLE:- return Double.longBitsToDouble(toLong(bytes.bytes, bytes.offset));- case DATE:- return new Date(toLong(bytes.bytes, bytes.offset));- default:- throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Unknown type for trie field: " + f.name());- }+ // the old BinaryField encoding is no longer supported+ return badFieldString(f);}}@@ -432,18 +417,6 @@ public class TrieField extends PrimitiveFieldType {}}- @Deprecated- static int toInt(byte[] arr, int offset) {- return (arr[offset]<<24) | ((arr[offset+1]&0xff)<<16) | ((arr[offset+2]&0xff)<<8) | (arr[offset+3]&0xff);- }-- @Deprecated- static long toLong(byte[] arr, int offset) {- int high = (arr[offset]<<24) | ((arr[offset+1]&0xff)<<16) | ((arr[offset+2]&0xff)<<8) | (arr[offset+3]&0xff);- int low = (arr[offset+4]<<24) | ((arr[offset+5]&0xff)<<16) | ((arr[offset+6]&0xff)<<8) | (arr[offset+7]&0xff);- return (((long)high)<<32) | (low&0x0ffffffffL);- }-@Overridepublic String storedToReadable(IndexableField f) {return toExternal(f);@@ -596,39 +569,8 @@ public class TrieField extends PrimitiveFieldType {throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Unknown type for trie field: " + f.name());}} else {- // the following code is "deprecated" and only to support pre-3.2 indexes using the old BinaryField encoding:- final BytesRef bytesRef = f.binaryValue();- if (bytesRef==null)- throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Invalid field contents: "+f.name());- switch (type) {- case INTEGER:- LegacyNumericUtils.intToPrefixCoded(toInt(bytesRef.bytes, bytesRef.offset), 0, bytes);- break;- case FLOAT: {- // WARNING: Code Duplication! Keep in sync with o.a.l.util.LegacyNumericUtils!- // copied from LegacyNumericUtils to not convert to/from float two times- // code in next 2 lines is identical to: int v = LegacyNumericUtils.floatToSortableInt(Float.intBitsToFloat(toInt(arr)));- int v = toInt(bytesRef.bytes, bytesRef.offset);- if (v<0) v ^= 0x7fffffff;- LegacyNumericUtils.intToPrefixCoded(v, 0, bytes);- break;- }- case LONG: //fallthrough!- case DATE:- LegacyNumericUtils.longToPrefixCoded(toLong(bytesRef.bytes, bytesRef.offset), 0, bytes);- break;- case DOUBLE: {- // WARNING: Code Duplication! Keep in sync with o.a.l.util.LegacyNumericUtils!- // copied from LegacyNumericUtils to not convert to/from double two times- // code in next 2 lines is identical to: long v = LegacyNumericUtils.doubleToSortableLong(Double.longBitsToDouble(toLong(arr)));- long v = toLong(bytesRef.bytes, bytesRef.offset);- if (v<0) v ^= 0x7fffffffffffffffL;- LegacyNumericUtils.longToPrefixCoded(v, 0, bytes);- break;- }- default:- throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Unknown type for trie field: " + f.name());- }+ // the old BinaryField encoding is no longer supported+ throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Invalid field contents: "+f.name());}}diff --git a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.javaindex da0c7bf5e66..833230977cc 100644--- a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java+++ b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java@@ -2392,11 +2392,6 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrIreturn openNanoTime;}- @Deprecated- public long getOpenTime() {- return openTime.getTime();- }-@Overridepublic Explanation explain(Query query, int doc) throws IOException {return super.explain(QueryUtils.makeQueryable(query), doc);diff --git a/solr/core/src/java/org/apache/solr/search/function/distance/GeoDistValueSourceParser.java b/solr/core/src/java/org/apache/solr/search/function/distance/GeoDistValueSourceParser.javaindex f7c05c3d30b..1f4ea34ff95 100644--- a/solr/core/src/java/org/apache/solr/search/function/distance/GeoDistValueSourceParser.java+++ b/solr/core/src/java/org/apache/solr/search/function/distance/GeoDistValueSourceParser.java@@ -135,8 +135,6 @@ public class GeoDistValueSourceParser extends ValueSourceParser {SpatialStrategy strategy = ((SpatialStrategyMultiValueSource) mv2).strategy;DistanceUnits distanceUnits = ((SpatialStrategyMultiValueSource) mv2).distanceUnits;Point queryPoint = strategy.getSpatialContext().makePoint(constants[1], constants[0]);- if (distanceUnits == DistanceUnits.BACKCOMPAT)- distanceUnits = DistanceUnits.KILOMETERS;return strategy.makeDistanceValueSource(queryPoint, distanceUnits.multiplierFromDegreesToThisUnit());}diff --git a/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.javaindex 5e805ca6821..a44b8f87b76 100644--- a/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java+++ b/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java@@ -60,11 +60,6 @@ public class UpdateShardHandler {private final UpdateShardHandlerConfig cfg;- @Deprecated- public UpdateShardHandler(NodeConfig cfg) {- this(cfg.getUpdateShardHandlerConfig());- }-public UpdateShardHandler(UpdateShardHandlerConfig cfg) {this.cfg = cfg;clientConnectionManager = new PoolingClientConnectionManager(SchemeRegistryFactory.createSystemDefault());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.javaindex ca2e5ce6340..4629425aa82 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@@ -220,12 +220,6 @@ public final class UpdateRequestProcessorChain implements PluginInfoInitializedreturn last;}-- @Deprecated- public UpdateRequestProcessorFactory[] getFactories() {- return chain.toArray(new UpdateRequestProcessorFactory[0]);- }-/*** Returns the underlying array of factories used in this chain.* Modifications to the array will affect future calls todiff --git a/solr/core/src/java/org/apache/solr/util/DistanceUnits.java b/solr/core/src/java/org/apache/solr/util/DistanceUnits.javaindex 7785bc9466c..63f43e4652f 100644--- a/solr/core/src/java/org/apache/solr/util/DistanceUnits.java+++ b/solr/core/src/java/org/apache/solr/util/DistanceUnits.java@@ -41,10 +41,6 @@ public class DistanceUnits {DistanceUtils.MILES_TO_KM * DistanceUtils.KM_TO_DEG);public final static DistanceUnits DEGREES = new DistanceUnits(DEGREES_PARAM, 180.0/Math.PI, 1.0);- // Previously, distance based filtering was done with km, but scores were based on degrees- @Deprecated- public final static DistanceUnits BACKCOMPAT = new DistanceUnits("backcompat", DistanceUtils.EARTH_MEAN_RADIUS_KM, 1.0);-//volatile so other threads see when we replace when copy-on-writeprivate static volatile Map<String, DistanceUnits> instances = ImmutableMap.of(KILOMETERS_PARAM, KILOMETERS,diff --git a/solr/core/src/test-files/solr/collection1/conf/schema_latest.xml b/solr/core/src/test-files/solr/collection1/conf/schema_latest.xmlindex fc8f7c11dd1..803d45eed77 100644--- a/solr/core/src/test-files/solr/collection1/conf/schema_latest.xml+++ b/solr/core/src/test-files/solr/collection1/conf/schema_latest.xml@@ -718,7 +718,7 @@http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4--><fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"- geo="true" distErrPct="0.025" maxDistErr="0.000009" units="degrees" />+ geo="true" distErrPct="0.025" maxDistErr="0.000009" /><!-- Money/currency field type. See http://wiki.apache.org/solr/MoneyFieldTypeParameters:diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-sql.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-sql.xmlindex e1649243e5d..10feac98fee 100644--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-sql.xml+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-sql.xml@@ -52,7 +52,6 @@<requestHandler name="standard" class="solr.StandardRequestHandler" default="true" /><requestHandler name="/update" class="solr.UpdateRequestHandler" />- <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" /><requestHandler name="/admin/ping" class="solr.PingRequestHandler"><lst name="invariants">diff --git a/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java b/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.javaindex aaf6b37d7b2..d3ad78b7480 100644--- a/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java+++ b/solr/core/src/test/org/apache/solr/TestSolrCoreProperties.java@@ -73,12 +73,13 @@ public class TestSolrCoreProperties extends SolrJettyTestBase {Files.createFile(collDir.toPath().resolve("core.properties"));- jetty = new JettySolrRunner(homeDir.getAbsolutePath(), buildJettyConfig("/solr"));+ Properties nodeProperties = new Properties();// this sets the property for jetty starting SolrDispatchFilterif (System.getProperty("solr.data.dir") == null && System.getProperty("solr.hdfs.home") == null) {- jetty.setDataDir(createTempDir().toFile().getCanonicalPath());+ nodeProperties.setProperty("solr.data.dir", createTempDir().toFile().getCanonicalPath());}+ jetty = new JettySolrRunner(homeDir.getAbsolutePath(), nodeProperties, buildJettyConfig("/solr"));jetty.start();port = jetty.getLocalPort();diff --git a/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.javaindex 68a09e2e16b..f1f3e9167b1 100644--- a/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.java@@ -26,6 +26,7 @@ import java.util.HashSet;import java.util.List;import java.util.Locale;import java.util.Map;+import java.util.Properties;import java.util.Set;import org.apache.http.params.CoreConnectionPNames;@@ -48,10 +49,12 @@ import org.apache.solr.common.cloud.ZkCoreNodeProps;import org.apache.solr.common.cloud.ZkStateReader;import org.apache.solr.common.params.CollectionParams;import org.apache.solr.common.params.CommonParams;+import org.apache.solr.common.params.CoreAdminParams;import org.apache.solr.common.params.ModifiableSolrParams;import org.apache.solr.common.util.NamedList;import org.apache.solr.common.util.StrUtils;import org.apache.solr.common.util.Utils;+import org.apache.solr.core.CoreDescriptor;import org.apache.solr.core.SolrCore;import org.apache.solr.handler.CdcrParams;import org.apache.zookeeper.CreateMode;@@ -693,14 +696,16 @@ public class BaseCdcrDistributedZkTest extends AbstractDistribZkTestBase {this.jetty = jetty;this.info = replica;this.collection = collection;++ Properties nodeProperties = jetty.getNodeProperties();// we need to update the jetty's shard so that it registers itself to the right shard when restartedthis.shard = shard;- this.jetty.setShards(this.shard);+ nodeProperties.setProperty(CoreDescriptor.CORE_SHARD, this.shard);// we need to update the jetty's shard so that it registers itself under the right core name when restartedthis.coreNodeName = coreNodeName;- this.jetty.setCoreNodeName(this.coreNodeName);+ nodeProperties.setProperty(CoreDescriptor.CORE_NODE_NAME, this.coreNodeName);this.nodeName = replica.getNodeName();diff --git a/solr/core/src/test/org/apache/solr/core/TestSolrXml.java b/solr/core/src/test/org/apache/solr/core/TestSolrXml.javaindex a6cccbc4c9d..1cfeb3fe339 100644--- a/solr/core/src/test/org/apache/solr/core/TestSolrXml.java+++ b/solr/core/src/test/org/apache/solr/core/TestSolrXml.java@@ -74,13 +74,9 @@ public class TestSolrXml extends SolrTestCaseJ4 {assertEquals("config set handler class", "testConfigSetsHandler", cfg.getConfigSetsHandlerClass());assertEquals("core load threads", 11, cfg.getCoreLoadThreadCount());assertThat("core root dir", cfg.getCoreRootDirectory().toString(), containsString("testCoreRootDirectory"));- assertEquals("distrib conn timeout", 22, cfg.getDistributedConnectionTimeout());assertEquals("distrib conn timeout", 22, cfg.getUpdateShardHandlerConfig().getDistributedConnectionTimeout());- assertEquals("distrib socket timeout", 33, cfg.getDistributedSocketTimeout());assertEquals("distrib socket timeout", 33, cfg.getUpdateShardHandlerConfig().getDistributedSocketTimeout());- assertEquals("max update conn", 3, cfg.getMaxUpdateConnections());assertEquals("max update conn", 3, cfg.getUpdateShardHandlerConfig().getMaxUpdateConnections());- assertEquals("max update conn/host", 37, cfg.getMaxUpdateConnectionsPerHost());assertEquals("max update conn/host", 37, cfg.getUpdateShardHandlerConfig().getMaxUpdateConnectionsPerHost());assertEquals("distrib conn timeout", 22, ucfg.getDistributedConnectionTimeout());assertEquals("distrib socket timeout", 33, ucfg.getDistributedSocketTimeout());diff --git a/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java b/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.javaindex 86ef0b13a68..529fa06aac5 100644--- a/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java+++ b/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java@@ -58,10 +58,10 @@ public class TestXIncludeConfig extends AbstractSolrTestCase {= core.getUpdateProcessingChain("special-include");assertNotNull("chain is missing included processor", chain);assertEquals("chain with inclued processor is wrong size",- 1, chain.getFactories().length);+ 1, chain.getProcessors().size());assertEquals("chain has wrong included processor",RegexReplaceProcessorFactory.class,- chain.getFactories()[0].getClass());+ chain.getProcessors().get(0).getClass());IndexSchema schema = core.getLatestSchema();diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.javaindex d60706e1e68..eab3e87ec49 100644--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java@@ -47,6 +47,7 @@ import org.apache.solr.SolrTestCaseJ4;import org.apache.solr.SolrTestCaseJ4.SuppressSSL;import org.apache.solr.client.solrj.SolrClient;import org.apache.solr.client.solrj.SolrServerException;+import org.apache.solr.client.solrj.embedded.JettyConfig;import org.apache.solr.client.solrj.embedded.JettySolrRunner;import org.apache.solr.client.solrj.impl.HttpSolrClient;import org.apache.solr.client.solrj.request.QueryRequest;@@ -144,8 +145,10 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {private static JettySolrRunner createJetty(SolrInstance instance) throws Exception {FileUtils.copyFile(new File(SolrTestCaseJ4.TEST_HOME(), "solr.xml"), new File(instance.getHomeDir(), "solr.xml"));- JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), "/solr", 0);- jetty.setDataDir(instance.getDataDir());+ Properties nodeProperties = new Properties();+ nodeProperties.setProperty("solr.data.dir", instance.getDataDir());+ JettyConfig jettyConfig = JettyConfig.builder().setContext("/solr").setPort(0).build();+ JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), nodeProperties, jettyConfig);jetty.start();return jetty;}diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.javaindex 83f4b41a5d7..29c0dd75239 100644--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java@@ -25,6 +25,7 @@ import java.nio.file.Files;import java.nio.file.Path;import java.nio.file.Paths;import java.util.Iterator;+import java.util.Properties;import java.util.regex.Matcher;import java.util.regex.Pattern;@@ -41,6 +42,7 @@ import org.apache.solr.SolrJettyTestBase;import org.apache.solr.SolrTestCaseJ4;import org.apache.solr.client.solrj.SolrClient;import org.apache.solr.client.solrj.SolrServerException;+import org.apache.solr.client.solrj.embedded.JettyConfig;import org.apache.solr.client.solrj.embedded.JettySolrRunner;import org.apache.solr.client.solrj.impl.HttpSolrClient;import org.apache.solr.common.SolrInputDocument;@@ -66,8 +68,10 @@ public class TestReplicationHandlerBackup extends SolrJettyTestBase {private static JettySolrRunner createJetty(TestReplicationHandler.SolrInstance instance) throws Exception {FileUtils.copyFile(new File(SolrTestCaseJ4.TEST_HOME(), "solr.xml"), new File(instance.getHomeDir(), "solr.xml"));- JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), "/solr", 0);- jetty.setDataDir(instance.getDataDir());+ Properties nodeProperties = new Properties();+ nodeProperties.setProperty("solr.data.dir", instance.getDataDir());+ JettyConfig jettyConfig = JettyConfig.builder().setContext("/solr").setPort(0).build();+ JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), nodeProperties, jettyConfig);jetty.start();return jetty;}diff --git a/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java b/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.javaindex d89b2179788..b219a8dbb0d 100644--- a/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java+++ b/solr/core/src/test/org/apache/solr/handler/TestRestoreCore.java@@ -25,6 +25,7 @@ import java.nio.file.DirectoryStream;import java.nio.file.Files;import java.nio.file.Path;import java.nio.file.Paths;+import java.util.Properties;import java.util.regex.Matcher;import java.util.regex.Pattern;@@ -35,6 +36,7 @@ import org.apache.solr.SolrJettyTestBase;import org.apache.solr.SolrTestCaseJ4;import org.apache.solr.client.solrj.SolrClient;import org.apache.solr.client.solrj.SolrServerException;+import org.apache.solr.client.solrj.embedded.JettyConfig;import org.apache.solr.client.solrj.embedded.JettySolrRunner;import org.apache.solr.client.solrj.impl.HttpSolrClient;import org.apache.solr.client.solrj.response.QueryResponse;@@ -59,8 +61,10 @@ public class TestRestoreCore extends SolrJettyTestBase {private static JettySolrRunner createJetty(TestReplicationHandler.SolrInstance instance) throws Exception {FileUtils.copyFile(new File(SolrTestCaseJ4.TEST_HOME(), "solr.xml"), new File(instance.getHomeDir(), "solr.xml"));- JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), "/solr", 0);- jetty.setDataDir(instance.getDataDir());+ Properties nodeProperties = new Properties();+ nodeProperties.setProperty("solr.data.dir", instance.getDataDir());+ JettyConfig jettyConfig = JettyConfig.builder().setContext("/solr").setPort(0).build();+ JettySolrRunner jetty = new JettySolrRunner(instance.getHomeDir(), nodeProperties, jettyConfig);jetty.start();return jetty;}diff --git a/solr/core/src/test/org/apache/solr/schema/SpatialRPTFieldTypeTest.java b/solr/core/src/test/org/apache/solr/schema/SpatialRPTFieldTypeTest.javaindex 4cb40efbb73..479a7fe62a0 100644--- a/solr/core/src/test/org/apache/solr/schema/SpatialRPTFieldTypeTest.java+++ b/solr/core/src/test/org/apache/solr/schema/SpatialRPTFieldTypeTest.java@@ -67,38 +67,8 @@ public class SpatialRPTFieldTypeTest extends AbstractBadConfigTestBase {final String DISTANCE_KILOMETERS = "150.33939";final String DISTANCE_MILES = "93.416565";- public void testUnitsDegrees() throws Exception { // test back compat behaviour- setupRPTField("degrees", null, "true");-- assertU(adoc("str", "X", "geo", INDEXED_COORDINATES));- assertU(commit());- String q;-- q = "geo:{!geofilt score=distance filter=false sfield=geo pt="+QUERY_COORDINATES+" d=1000}";- assertQ(req("q", q, "fl", "*,score"), "//result/doc/float[@name='score'][.='"+DISTANCE_DEGREES+"']");-- q = "geo:{!geofilt score=degrees filter=false sfield=geo pt="+QUERY_COORDINATES+" d=1000}";- assertQ(req("q", q, "fl", "*,score"), "//result/doc/float[@name='score'][.='"+DISTANCE_DEGREES+"']");-- q = "geo:{!geofilt score=kilometers filter=false sfield=geo pt="+QUERY_COORDINATES+" d=1000}";- assertQ(req("q", q, "fl", "*,score"), "//result/doc/float[@name='score'][.='"+DISTANCE_KILOMETERS+"']");-- q = "geo:{!geofilt score=miles filter=false sfield=geo pt="+QUERY_COORDINATES+" d=1000}";- assertQ(req("q", q, "fl", "*,score"), "//result/doc/float[@name='score'][.='"+DISTANCE_MILES+"']");- }-- public void testUnitsNonDegrees() throws Exception {- try {- setupRPTField("kilometers", null, "true");- fail("Expected exception for deprecated units parameter.");- } catch (Exception ex) {- if(!ex.getMessage().startsWith("units parameter is deprecated"))- throw ex;- }- }-public void testDistanceUnitsDegrees() throws Exception {- setupRPTField(null, "degrees", "true");+ setupRPTField("degrees", "true");assertU(adoc("str", "X", "geo", INDEXED_COORDINATES));assertU(commit());@@ -118,7 +88,7 @@ public class SpatialRPTFieldTypeTest extends AbstractBadConfigTestBase {}public void testDistanceUnitsKilometers() throws Exception {- setupRPTField(null, "kilometers", "true");+ setupRPTField("kilometers", "true");assertU(adoc("str", "X", "geo", INDEXED_COORDINATES));assertU(commit());@@ -137,19 +107,9 @@ public class SpatialRPTFieldTypeTest extends AbstractBadConfigTestBase {assertQ(req("q", q, "fl", "*,score"), "//result/doc/float[@name='score'][.='"+DISTANCE_MILES+"']");}- public void testBothUnitsAndDistanceUnits() throws Exception { // distanceUnits should take precedence- try {- setupRPTField("degrees", "kilometers", "true");- fail("Expected exception for deprecated units parameter.");- } catch (Exception ex) {- if(!ex.getMessage().startsWith("units parameter is deprecated"))- throw ex;- }- }-public void testJunkValuesForDistanceUnits() throws Exception {try {- setupRPTField(null, "rose", "true");+ setupRPTField("rose", "true");fail("Expected exception for bad value of distanceUnits.");} catch (Exception ex) {if(!ex.getMessage().startsWith("Must specify distanceUnits as one of"))@@ -196,7 +156,7 @@ public class SpatialRPTFieldTypeTest extends AbstractBadConfigTestBase {}public void testGeoDistanceFunctionWithBackCompat() throws Exception {- setupRPTField("degrees", null, "true");+ setupRPTField(null, "true");assertU(adoc("str", "X", "geo", "1,2"));assertU(commit());@@ -212,7 +172,7 @@ public class SpatialRPTFieldTypeTest extends AbstractBadConfigTestBase {}public void testGeoDistanceFunctionWithKilometers() throws Exception {- setupRPTField(null, "kilometers", "true");+ setupRPTField("kilometers", "true");assertU(adoc("str", "X", "geo", "1,2"));assertU(commit());@@ -227,7 +187,7 @@ public class SpatialRPTFieldTypeTest extends AbstractBadConfigTestBase {}public void testGeoDistanceFunctionWithMiles() throws Exception {- setupRPTField(null, "miles", "true");+ setupRPTField("miles", "true");assertU(adoc("str", "X", "geo", "1,2"));assertU(commit());@@ -241,7 +201,7 @@ public class SpatialRPTFieldTypeTest extends AbstractBadConfigTestBase {);}- private void setupRPTField(String units, String distanceUnits, String geo) throws Exception {+ private void setupRPTField(String distanceUnits, String geo) throws Exception {deleteCore();File managedSchemaFile = new File(tmpConfDir, "managed-schema");Files.delete(managedSchemaFile.toPath()); // Delete managed-schema so it won't block parsing a new schema@@ -256,8 +216,6 @@ public class SpatialRPTFieldTypeTest extends AbstractBadConfigTestBase {SpatialRecursivePrefixTreeFieldType rptFieldType = new SpatialRecursivePrefixTreeFieldType();Map<String, String> rptMap = new HashMap<String,String>();- if(units!=null)- rptMap.put("units", units);if(distanceUnits!=null)rptMap.put("distanceUnits", distanceUnits);if(geo!=null)diff --git a/solr/core/src/test/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactoryTest.java b/solr/core/src/test/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactoryTest.javaindex e625f8f9eb7..281f486a598 100644--- a/solr/core/src/test/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactoryTest.java+++ b/solr/core/src/test/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactoryTest.java@@ -28,6 +28,7 @@ import org.apache.solr.update.DeleteUpdateCommand;import org.junit.BeforeClass;import java.util.Date;+import java.util.List;import java.util.concurrent.TimeUnit;/**@@ -167,13 +168,13 @@ public class DocExpirationUpdateProcessorFactoryTest extends UpdateProcessorTestassertNotNull(chain);- UpdateRequestProcessorFactory[] factories = chain.getFactories();+ List<UpdateRequestProcessorFactory> factories = chain.getProcessors();assertEquals("did number of processors configured in chain get changed?",- 5, factories.length);- assertTrue("Expected [1] RecordingUpdateProcessorFactory: " + factories[1].getClass(),- factories[1] instanceof RecordingUpdateProcessorFactory);+ 5, factories.size());+ assertTrue("Expected [1] RecordingUpdateProcessorFactory: " + factories.get(1).getClass(),+ factories.get(1) instanceof RecordingUpdateProcessorFactory);RecordingUpdateProcessorFactory recorder =- (RecordingUpdateProcessorFactory) factories[1];+ (RecordingUpdateProcessorFactory) factories.get(1);// now start recording, and monitor for the expected commandsdiff --git a/solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java b/solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.javaindex da42071bb9c..0bef1a01658 100644--- a/solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java+++ b/solr/core/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java@@ -87,8 +87,7 @@ public class SignatureUpdateProcessorFactoryTest extends SolrTestCaseJ4 {SolrCore core = h.getCore();UpdateRequestProcessorChain chained = core.getUpdateProcessingChain(this.chain);- SignatureUpdateProcessorFactory factory = ((SignatureUpdateProcessorFactory) chained- .getFactories()[0]);+ SignatureUpdateProcessorFactory factory = ((SignatureUpdateProcessorFactory) chained.getProcessors().get(0));factory.setEnabled(true);assertNotNull(chained);@@ -108,8 +107,7 @@ public class SignatureUpdateProcessorFactoryTest extends SolrTestCaseJ4 {SolrCore core = h.getCore();UpdateRequestProcessorChain chained = core.getUpdateProcessingChain("dedupe");- SignatureUpdateProcessorFactory factory = ((SignatureUpdateProcessorFactory) chained- .getFactories()[0]);+ SignatureUpdateProcessorFactory factory = ((SignatureUpdateProcessorFactory) chained.getProcessors().get(0));factory.setEnabled(true);assertNotNull(chained);@@ -154,8 +152,7 @@ public class SignatureUpdateProcessorFactoryTest extends SolrTestCaseJ4 {public void testMultiThreaded() throws Exception {UpdateRequestProcessorChain chained = h.getCore().getUpdateProcessingChain("dedupe");- SignatureUpdateProcessorFactory factory = ((SignatureUpdateProcessorFactory) chained- .getFactories()[0]);+ SignatureUpdateProcessorFactory factory = ((SignatureUpdateProcessorFactory) chained.getProcessors().get(0));factory.setEnabled(true);Thread[] threads = null;Thread[] threads2 = null;@@ -271,8 +268,7 @@ public class SignatureUpdateProcessorFactoryTest extends SolrTestCaseJ4 {SolrCore core = h.getCore();UpdateRequestProcessorChain chained = core.getUpdateProcessingChain(chain);- SignatureUpdateProcessorFactory factory = ((SignatureUpdateProcessorFactory) chained- .getFactories()[0]);+ SignatureUpdateProcessorFactory factory = ((SignatureUpdateProcessorFactory) chained.getProcessors().get(0));factory.setEnabled(true);Map<String,String[]> params = new HashMap<>();diff --git a/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java b/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.javaindex b55d73aa5a7..4ef60410c29 100644--- a/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java+++ b/solr/core/src/test/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactoryTest.java@@ -75,7 +75,7 @@ public class StatelessScriptUpdateProcessorFactoryTest extends UpdateProcessorTepublic void testSingleScript() throws Exception {SolrCore core = h.getCore();UpdateRequestProcessorChain chained = core.getUpdateProcessingChain("single-script");- final StatelessScriptUpdateProcessorFactory factory = ((StatelessScriptUpdateProcessorFactory) chained.getFactories()[0]);+ final StatelessScriptUpdateProcessorFactory factory = ((StatelessScriptUpdateProcessorFactory) chained.getProcessors().get(0));final List<String> functionMessages = new ArrayList<>();factory.setScriptEngineCustomizer(new ScriptEngineCustomizer() {@Override@@ -120,7 +120,7 @@ public class StatelessScriptUpdateProcessorFactoryTest extends UpdateProcessorTeUpdateRequestProcessorChain chained = core.getUpdateProcessingChain(chain);final StatelessScriptUpdateProcessorFactory factory =- ((StatelessScriptUpdateProcessorFactory) chained.getFactories()[0]);+ ((StatelessScriptUpdateProcessorFactory) chained.getProcessors().get(0));final List<String> functionMessages = new ArrayList<>();ScriptEngineCustomizer customizer = new ScriptEngineCustomizer() {@Overridediff --git a/solr/core/src/test/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactoryTest.java b/solr/core/src/test/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactoryTest.javaindex 4d684db3443..5f25d97f528 100644--- a/solr/core/src/test/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactoryTest.java+++ b/solr/core/src/test/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactoryTest.java@@ -59,8 +59,7 @@ public class UniqFieldsUpdateProcessorFactoryTest extends SolrTestCaseJ4 {SolrCore core = h.getCore();UpdateRequestProcessorChain chained = core.getUpdateProcessingChain("uniq-fields");- UniqFieldsUpdateProcessorFactory factory = ((UniqFieldsUpdateProcessorFactory) chained- .getFactories()[0]);+ UniqFieldsUpdateProcessorFactory factory = ((UniqFieldsUpdateProcessorFactory) chained.getProcessors().get(0));assertNotNull(chained);addDoc(adoc("id", "1a",diff --git a/solr/core/src/test/org/apache/solr/update/processor/UpdateRequestProcessorFactoryTest.java b/solr/core/src/test/org/apache/solr/update/processor/UpdateRequestProcessorFactoryTest.javaindex e5d060e2c36..8325cc0dc73 100644--- a/solr/core/src/test/org/apache/solr/update/processor/UpdateRequestProcessorFactoryTest.java+++ b/solr/core/src/test/org/apache/solr/update/processor/UpdateRequestProcessorFactoryTest.java@@ -51,10 +51,10 @@ public class UpdateRequestProcessorFactoryTest extends AbstractSolrTestCase {// Make sure it got 3 items (4 configured, 1 is enable=false)assertEquals("wrong number of (enabled) factories in chain",- 3, chained.getFactories().length );+ 3, chained.getProcessors().size() );// first one should be log, and it should be configured properly- UpdateRequestProcessorFactory first = chained.getFactories()[0];+ UpdateRequestProcessorFactory first = chained.getProcessors().get(0);assertEquals("wrong factory at front of chain",LogUpdateProcessorFactory.class, first.getClass());LogUpdateProcessorFactory log = (LogUpdateProcessorFactory)first;@@ -65,7 +65,7 @@ public class UpdateRequestProcessorFactoryTest extends AbstractSolrTestCase {UpdateRequestProcessorChain custom = core.getUpdateProcessingChain( null );- CustomUpdateRequestProcessorFactory link = (CustomUpdateRequestProcessorFactory) custom.getFactories()[0];+ CustomUpdateRequestProcessorFactory link = (CustomUpdateRequestProcessorFactory) custom.getProcessors().get(0);assertEquals( custom, core.getUpdateProcessingChain( "" ) );assertEquals( custom, core.getUpdateProcessingChain( "custom" ) );@@ -99,7 +99,7 @@ public class UpdateRequestProcessorFactoryTest extends AbstractSolrTestCase {// either explicitly, or because of injectionassertEquals(name + " chain length: " + chain.toString(), EXPECTED_CHAIN_LENGTH,- chain.getFactories().length);+ chain.getProcessors().size());// test a basic (non distrib) chainproc = chain.createProcessor(req(), new SolrQueryResponse());diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.javaindex df99560ffd0..fe445970561 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java@@ -689,11 +689,6 @@ public class HttpSolrClient extends SolrClient {}}- /**- * @deprecated retries should be implemented in client code, and should be considered carefully per-request- */- public void setMaxRetries(int maxRetries) { }-public void setRequestWriter(RequestWriter requestWriter) {this.requestWriter = requestWriter;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.javaindex 441be5d47dc..768de299e29 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java@@ -184,14 +184,6 @@ public abstract class CollectionAdminRequest <Q extends CollectionAdminRequest<Qreturn this.shardName;}- @Deprecated- public ModifiableSolrParams getCommonParams() {- ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();- params.set(CoreAdminParams.COLLECTION, collection);- params.set(CoreAdminParams.SHARD, shardName);- return params;- }-@Overridepublic SolrParams getParams() {ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();@@ -669,15 +661,6 @@ public abstract class CollectionAdminRequest <Q extends CollectionAdminRequest<Qreturn this.aliasedCollections;}- /**- * @param aliasName the alias name- * @deprecated use {@link #setAliasName(String)} instead- */- @Deprecated- public void setCollectionName(String aliasName) {- this.aliasName = aliasName;- }-@Overridepublic SolrParams getParams() {ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/PivotField.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/PivotField.javaindex fb095f79c1b..6b07392136e 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/PivotField.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/PivotField.java@@ -33,14 +33,6 @@ public class PivotField implements Serializablefinal Map<String,Integer> _querycounts;final List<RangeFacet> _ranges;- /**- * @deprecated Use {@link #PivotField(String,Object,int,List,Map,Map,List)} with null <code>statsInfo</code>, queryCounts and ranges- */- @Deprecated- public PivotField( String f, Object v, int count, List<PivotField> pivot) {- this(f, v, count, pivot, null, null, null);- }-public PivotField( String f, Object v, int count, List<PivotField> pivot, Map<String,FieldStatsInfo> statsInfo, Map<String,Integer> queryCounts, List<RangeFacet> ranges){_field = f;diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java b/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.javaindex 54c4b6ec36a..31d54a89fa0 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java@@ -61,42 +61,6 @@ public class ClientUtilsreturn streams;}- /**- * @param d SolrDocument to convert- * @return a SolrInputDocument with the same fields and values as the- * SolrDocument. All boosts are 1.0f- * @deprecated This method will be removed in Solr 6.0- */- @Deprecated- public static SolrInputDocument toSolrInputDocument( SolrDocument d )- {- SolrInputDocument doc = new SolrInputDocument();- for( String name : d.getFieldNames() ) {- doc.addField( name, d.getFieldValue(name), 1.0f );- }- return doc;- }-- /**- * @param d SolrInputDocument to convert- * @return a SolrDocument with the same fields and values as the SolrInputDocument- * @deprecated This method will be removed in Solr 6.0- */- @Deprecated- public static SolrDocument toSolrDocument(SolrInputDocument d) {- SolrDocument doc = new SolrDocument();- for (SolrInputField field : d) {- doc.setField(field.getName(), field.getValue());- }- if (d.getChildDocuments() != null) {- for (SolrInputDocument in : d.getChildDocuments()) {- doc.addChildDocument(toSolrDocument(in));- }-- }- return doc;- }-//------------------------------------------------------------------------//------------------------------------------------------------------------diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ClosableThread.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ClosableThread.javadeleted file mode 100644index 861a9c8ee57..00000000000--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ClosableThread.java+++ /dev/null@@ -1,26 +0,0 @@-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-package org.apache.solr.common.cloud;--/**- * @deprecated because this class is no longer used internally and will be removed- */-@Deprecated-public interface ClosableThread {- public void close();- public boolean isClosed();-}diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.javaindex a32743c4fd9..0f50f0a81ce 100644--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java@@ -66,11 +66,6 @@ public class ZkCmdExecutor {Thread.currentThread().interrupt();throw new InterruptedException();}- if (Thread.currentThread() instanceof ClosableThread) {- if (((ClosableThread) Thread.currentThread()).isClosed()) {- throw exception;- }- }if (i != retryCount -1) {retryDelay(i);}diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.javaindex a904f3ea4b0..60a8100a1ba 100644--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java@@ -419,8 +419,7 @@ public class ZkStateReader implements Closeable {}this.clusterState = new ClusterState(liveNodes, result, legacyClusterStateVersion);- LOG.debug("clusterStateSet: version [{}] legacy [{}] interesting [{}] watched [{}] lazy [{}] total [{}]",- clusterState.getZkClusterStateVersion(),+ LOG.debug("clusterStateSet: legacy [{}] interesting [{}] watched [{}] lazy [{}] total [{}]",legacyCollectionStates.keySet().size(),interestingCollections.size(),watchedCollectionStates.keySet().size(),@@ -428,8 +427,7 @@ public class ZkStateReader implements Closeable {clusterState.getCollectionStates().size());if (LOG.isTraceEnabled()) {- LOG.trace("clusterStateSet: version [{}] legacy [{}] interesting [{}] watched [{}] lazy [{}] total [{}]",- clusterState.getZkClusterStateVersion(),+ LOG.trace("clusterStateSet: legacy [{}] interesting [{}] watched [{}] lazy [{}] total [{}]",legacyCollectionStates.keySet(),interestingCollections,watchedCollectionStates.keySet(),diff --git a/solr/solrj/src/java/org/apache/solr/common/util/IteratorChain.java b/solr/solrj/src/java/org/apache/solr/common/util/IteratorChain.javadeleted file mode 100644index 9e47c873cb9..00000000000--- a/solr/solrj/src/java/org/apache/solr/common/util/IteratorChain.java+++ /dev/null@@ -1,86 +0,0 @@-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-package org.apache.solr.common.util;--import java.util.ArrayList;-import java.util.Iterator;-import java.util.List;--/** Chain several Iterators, so that this iterates- * over all of them in sequence.- *- * @deprecated This class is no longer used by Solr, and may be removed in future versions- */-@Deprecated-public class IteratorChain<E> implements Iterator<E> {-- private final List<Iterator<E>> iterators = new ArrayList<>();- private Iterator<Iterator<E>> itit;- private Iterator<E> current;-- public void addIterator(Iterator<E> it) {- if(itit!=null) throw new RuntimeException("all Iterators must be added before calling hasNext()");- iterators.add(it);- }-- @Override- public boolean hasNext() {- if(itit==null) itit = iterators.iterator();- return recursiveHasNext();- }-- /** test if current iterator hasNext(), and if not try the next- * one in sequence, recursively- */- private boolean recursiveHasNext() {- // return false if we have no more iterators- if(current==null) {- if(itit.hasNext()) {- current=itit.next();- } else {- return false;- }- }-- boolean result = current.hasNext();- if(!result) {- current = null;- result = recursiveHasNext();- }-- return result;- }-- /** hasNext() must ALWAYS be called before calling this- * otherwise it's a bit hard to keep track of what's happening- */- @Override- public E next() {- if(current==null) {- throw new RuntimeException("For an IteratorChain, hasNext() MUST be called before calling next()");- }- return current.next();- }-- @Override- public void remove() {- // we just need this class- // to iterate in readonly mode- throw new UnsupportedOperationException();- }--}diff --git a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xml b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xmlindex e1649243e5d..10feac98fee 100644--- a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xml+++ b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xml@@ -52,7 +52,6 @@<requestHandler name="standard" class="solr.StandardRequestHandler" default="true" /><requestHandler name="/update" class="solr.UpdateRequestHandler" />- <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" /><requestHandler name="/admin/ping" class="solr.PingRequestHandler"><lst name="invariants">diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java b/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.javaindex 7b838be07b4..6390ddcd793 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java@@ -101,67 +101,6 @@ public class TestDocumentObjectBinder extends LuceneTestCase {assertEquals("CCTV Store", supplierTwo.get(0));}- public void testToAndFromSolrDocument() {- Item item = new Item();- item.id = "one";- item.inStock = false;- item.categories = new String[] {"aaa", "bbb", "ccc"};- item.features = Arrays.asList(item.categories);- List<String> supA = Arrays.asList("supA1", "supA2", "supA3");- List<String> supB = Arrays.asList("supB1", "supB2", "supB3");- item.supplier = new HashMap<>();- item.supplier.put("supplier_supA", supA);- item.supplier.put("supplier_supB", supB);-- item.supplier_simple = new HashMap<>();- item.supplier_simple.put("sup_simple_supA", "supA_val");- item.supplier_simple.put("sup_simple_supB", "supB_val");-- DocumentObjectBinder binder = new DocumentObjectBinder();- SolrInputDocument doc = binder.toSolrInputDocument(item);- SolrDocumentList docs = new SolrDocumentList();- docs.add(ClientUtils.toSolrDocument(doc));- Item out = binder.getBeans(Item.class, docs).get(0);- Item singleOut = binder.getBean(Item.class, ClientUtils.toSolrDocument(doc));-- // make sure it came out the same- assertEquals(item.id, out.id);- assertEquals(item.inStock, out.inStock);- assertEquals(item.categories.length, out.categories.length);- assertEquals(item.features, out.features);- assertEquals(supA, out.supplier.get("supplier_supA"));- assertEquals(supB, out.supplier.get("supplier_supB"));- assertEquals(item.supplier_simple.get("sup_simple_supB"), out.supplier_simple.get("sup_simple_supB"));-- assertEquals(item.id, singleOut.id);- assertEquals(item.inStock, singleOut.inStock);- assertEquals(item.categories.length, singleOut.categories.length);- assertEquals(item.features, singleOut.features);- assertEquals(supA, singleOut.supplier.get("supplier_supA"));- assertEquals(supB, singleOut.supplier.get("supplier_supB"));- assertEquals(item.supplier_simple.get("sup_simple_supB"), out.supplier_simple.get("sup_simple_supB"));--// put back "out" as Bean, to see if both ways work as you would expect-// but the Field that "allSuppliers" need to be cleared, as it is just for-// retrieving data, not to post data- out.allSuppliers = null;- SolrInputDocument doc1 = binder.toSolrInputDocument(out);-- SolrDocumentList docs1 = new SolrDocumentList();- docs1.add(ClientUtils.toSolrDocument(doc1));- Item out1 = binder.getBeans(Item.class, docs1).get(0);-- assertEquals(item.id, out1.id);- assertEquals(item.inStock, out1.inStock);- assertEquals(item.categories.length, out1.categories.length);- assertEquals(item.features, out1.features);-- assertEquals(item.supplier_simple.get("sup_simple_supB"), out1.supplier_simple.get("sup_simple_supB"));-- assertEquals(supA, out1.supplier.get("supplier_supA"));- assertEquals(supB, out1.supplier.get("supplier_supB"));- }-public void testChild() throws Exception {SingleValueChild in = new SingleValueChild();in.id = "1";@@ -169,10 +108,11 @@ public class TestDocumentObjectBinder extends LuceneTestCase {in.child.id = "1.0";in.child.name = "Name One";DocumentObjectBinder binder = new DocumentObjectBinder();- SolrInputDocument doc = binder.toSolrInputDocument(in);- assertEquals(1, doc.getChildDocuments().size());- assertEquals(1, ClientUtils.toSolrDocument(doc).getChildDocuments().size());- SingleValueChild out = binder.getBean(SingleValueChild.class, ClientUtils.toSolrDocument(doc));+ SolrInputDocument solrInputDoc = binder.toSolrInputDocument(in);+ SolrDocument solrDoc = toSolrDocument(solrInputDoc);+ assertEquals(1, solrInputDoc.getChildDocuments().size());+ assertEquals(1, solrDoc.getChildDocuments().size());+ SingleValueChild out = binder.getBean(SingleValueChild.class, solrDoc);assertEquals(in.id, out.id);assertEquals(in.child.id, out.child.id);assertEquals(in.child.name, out.child.name);@@ -183,10 +123,11 @@ public class TestDocumentObjectBinder extends LuceneTestCase {child.id = "1.1";child.name = "Name Two";listIn.child = Arrays.asList(in.child, child);- doc = binder.toSolrInputDocument(listIn);- assertEquals(2, doc.getChildDocuments().size());- assertEquals(2, ClientUtils.toSolrDocument(doc).getChildDocuments().size());- ListChild listOut = binder.getBean(ListChild.class, ClientUtils.toSolrDocument(doc));+ solrInputDoc = binder.toSolrInputDocument(listIn);+ solrDoc = toSolrDocument(solrInputDoc);+ assertEquals(2, solrInputDoc.getChildDocuments().size());+ assertEquals(2, solrDoc.getChildDocuments().size());+ ListChild listOut = binder.getBean(ListChild.class, solrDoc);assertEquals(listIn.id, listOut.id);assertEquals(listIn.child.get(0).id, listOut.child.get(0).id);assertEquals(listIn.child.get(0).name, listOut.child.get(0).name);@@ -196,10 +137,11 @@ public class TestDocumentObjectBinder extends LuceneTestCase {ArrayChild arrIn = new ArrayChild();arrIn.id = "3";arrIn.child = new Child[]{in.child, child};- doc = binder.toSolrInputDocument(arrIn);- assertEquals(2, doc.getChildDocuments().size());- assertEquals(2, ClientUtils.toSolrDocument(doc).getChildDocuments().size());- ArrayChild arrOut = binder.getBean(ArrayChild.class, ClientUtils.toSolrDocument(doc));+ solrInputDoc = binder.toSolrInputDocument(arrIn);+ solrDoc = toSolrDocument(solrInputDoc);+ assertEquals(2, solrInputDoc.getChildDocuments().size());+ assertEquals(2, solrDoc.getChildDocuments().size());+ ArrayChild arrOut = binder.getBean(ArrayChild.class, solrDoc);assertEquals(arrIn.id, arrOut.id);assertEquals(arrIn.child[0].id, arrOut.child[0].id);assertEquals(arrIn.child[0].name, arrOut.child[0].name);@@ -208,6 +150,19 @@ public class TestDocumentObjectBinder extends LuceneTestCase {}+ private static SolrDocument toSolrDocument(SolrInputDocument d) {+ SolrDocument doc = new SolrDocument();+ for (SolrInputField field : d) {+ doc.setField(field.getName(), field.getValue());+ }+ if (d.getChildDocuments() != null) {+ for (SolrInputDocument in : d.getChildDocuments()) {+ doc.addChildDocument(toSolrDocument(in));+ }+ }+ return doc;+ }+public static class Item {@FieldString id;diff --git a/solr/solrj/src/test/org/apache/solr/common/util/IteratorChainTest.java b/solr/solrj/src/test/org/apache/solr/common/util/IteratorChainTest.javadeleted file mode 100644index e26563f0126..00000000000--- a/solr/solrj/src/test/org/apache/solr/common/util/IteratorChainTest.java+++ /dev/null@@ -1,104 +0,0 @@-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-package org.apache.solr.common.util;--import java.util.ArrayList;-import java.util.Iterator;-import java.util.List;--import org.apache.lucene.util.LuceneTestCase;-import org.apache.solr.common.util.IteratorChain;--public class IteratorChainTest extends LuceneTestCase {-- private Iterator<String> makeIterator(String marker,int howMany) {- final List<String> c = new ArrayList<>();- for(int i = 1; i <= howMany; i++) {- c.add(marker + i);- }- return c.iterator();- }-- public void testNoIterator() {- final IteratorChain<String> c = new IteratorChain<>();- assertFalse("Empty IteratorChain.hastNext() is false",c.hasNext());- assertEquals("",getString(c));- }-- public void testCallNextTooEarly() {- final IteratorChain<String> c = new IteratorChain<>();- c.addIterator(makeIterator("a",3));- try {- c.next();- fail("Calling next() before hasNext() should throw RuntimeException");- } catch(RuntimeException asExpected) {- // we're fine- }- }-- public void testCallAddTooLate() {- final IteratorChain<String> c = new IteratorChain<>();- c.hasNext();- try {- c.addIterator(makeIterator("a",3));- fail("Calling addIterator after hasNext() should throw RuntimeException");- } catch(RuntimeException asExpected) {- // we're fine- }- }-- public void testRemove() {- final IteratorChain<String> c = new IteratorChain<>();- try {- c.remove();- fail("Calling remove should throw UnsupportedOperationException");- } catch(UnsupportedOperationException asExpected) {- // we're fine- }- }-- public void testOneIterator() {- final IteratorChain<String> c = new IteratorChain<>();- c.addIterator(makeIterator("a",3));- assertEquals("a1a2a3",getString(c));- }-- public void testTwoIterators() {- final IteratorChain<String> c = new IteratorChain<>();- c.addIterator(makeIterator("a",3));- c.addIterator(makeIterator("b",2));- assertEquals("a1a2a3b1b2",getString(c));- }-- public void testEmptyIteratorsInTheMiddle() {- final IteratorChain<String> c = new IteratorChain<>();- c.addIterator(makeIterator("a",3));- c.addIterator(makeIterator("b",0));- c.addIterator(makeIterator("c",1));- assertEquals("a1a2a3c1",getString(c));- }-- /** dump the contents of it to a String */- private String getString(Iterator<String> it) {- final StringBuilder sb = new StringBuilder();- sb.append("");- while(it.hasNext()) {- sb.append(it.next());- }- return sb.toString();- }-}diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.javaindex a3f74e6edd4..4aed1356415 100644--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java@@ -22,6 +22,7 @@ import org.apache.lucene.util.IOUtils;import org.apache.lucene.util.LuceneTestCase;import org.apache.solr.client.solrj.SolrClient;import org.apache.solr.client.solrj.SolrServerException;+import org.apache.solr.client.solrj.embedded.JettyConfig;import org.apache.solr.client.solrj.embedded.JettySolrRunner;import org.apache.solr.client.solrj.impl.HttpSolrClient;import org.apache.solr.client.solrj.impl.NoOpResponseParser;@@ -32,6 +33,7 @@ import org.apache.solr.common.SolrInputDocument;import org.apache.solr.common.params.ModifiableSolrParams;import org.apache.solr.common.params.SolrParams;import org.apache.solr.common.util.NamedList;+import org.apache.solr.core.CoreDescriptor;import org.apache.solr.request.SolrQueryRequest;import org.apache.solr.schema.IndexSchema;import org.apache.solr.schema.SchemaField;@@ -449,7 +451,16 @@ public class SolrTestCaseHS extends SolrTestCaseJ4 {}if (jetty == null) {- jetty = new JettySolrRunner(baseDir.getAbsolutePath(), "/solr", port, solrconfigFile, schemaFile, true, null, null, null);+ JettyConfig jettyConfig = JettyConfig.builder()+ .stopAtShutdown(true)+ .setContext("/solr")+ .setPort(port)+ .withSSLConfig(sslConfig)+ .build();+ Properties nodeProperties = new Properties();+ nodeProperties.setProperty("solrconfig", solrconfigFile);+ nodeProperties.setProperty(CoreDescriptor.CORE_SCHEMA, schemaFile);+ jetty = new JettySolrRunner(baseDir.getAbsolutePath(), nodeProperties, jettyConfig);}// silly stuff included from solrconfig.snippet.randomindexconfig.xmldiff --git a/solr/webapp/web/js/angular/app.js b/solr/webapp/web/js/angular/app.jsindex afb77d642cc..afd3271f4d0 100644--- a/solr/webapp/web/js/angular/app.js+++ b/solr/webapp/web/js/angular/app.js@@ -787,16 +787,5 @@ var solr_admin = function( app_config )},error : function(){- show_global_error- (- '<div class="message"><p>Unable to load environment info from <code>' + system_url.esc() + '</code>.</p>' +- '<p>This interface requires that you activate the admin request handlers in all SolrCores by adding the ' +- 'following configuration to your <code>solrconfig.xml</code>:</p></div>' + "\n" +-- '<div class="code"><pre class="syntax language-xml"><code>' +- '<!-- Admin Handlers - This will register all the standard admin RequestHandlers. -->'.esc() + "\n" +- '<requestHandler name="/admin/" class="solr.admin.AdminHandlers" />'.esc() +- '</code></pre></div>'- );};*/diff --git a/solr/webapp/web/js/scripts/app.js b/solr/webapp/web/js/scripts/app.jsindex 32382b07ec5..a967cfe307a 100644--- a/solr/webapp/web/js/scripts/app.js+++ b/solr/webapp/web/js/scripts/app.js@@ -479,17 +479,6 @@ var solr_admin = function( app_config )},error : function(){- show_global_error- (- '<div class="message"><p>Unable to load environment info from <code>' + system_url.esc() + '</code>.</p>' +- '<p>This interface requires that you activate the admin request handlers in all SolrCores by adding the ' +- 'following configuration to your <code>solrconfig.xml</code>:</p></div>' + "\n" +-- '<div class="code"><pre class="syntax language-xml"><code>' +- '<!-- Admin Handlers - This will register all the standard admin RequestHandlers. -->'.esc() + "\n" +- '<requestHandler name="/admin/" class="solr.admin.AdminHandlers" />'.esc() +- '</code></pre></div>'- );},complete : function(){