mirror of https://github.com/apache/lucene.git
SOLR-9079: Remove commons-lang as a dependency
Signed-off-by: Kevin Risden <krisden@apache.org>
This commit is contained in:
parent
14175c46d2
commit
6222abf448
|
@ -115,7 +115,7 @@ org.apache.calcite.version = 1.18.0
|
||||||
/org.apache.commons/commons-exec = 1.3
|
/org.apache.commons/commons-exec = 1.3
|
||||||
/org.apache.commons/commons-lang3 = 3.8.1
|
/org.apache.commons/commons-lang3 = 3.8.1
|
||||||
/org.apache.commons/commons-math3 = 3.6.1
|
/org.apache.commons/commons-math3 = 3.6.1
|
||||||
/org.apache.commons/commons-text = 1.4
|
/org.apache.commons/commons-text = 1.6
|
||||||
|
|
||||||
org.apache.curator.version = 2.13.0
|
org.apache.curator.version = 2.13.0
|
||||||
/org.apache.curator/curator-client = ${org.apache.curator.version}
|
/org.apache.curator/curator-client = ${org.apache.curator.version}
|
||||||
|
|
|
@ -137,6 +137,8 @@ Improvements
|
||||||
|
|
||||||
* SOLR-13227: Optimizing facet.range.other by avoiding expensive exceptions (Nikolay Khitrin via Mikhail Khludnev)
|
* SOLR-13227: Optimizing facet.range.other by avoiding expensive exceptions (Nikolay Khitrin via Mikhail Khludnev)
|
||||||
|
|
||||||
|
* SOLR-9079: Remove commons-lang as a dependency (Kevin Risden)
|
||||||
|
|
||||||
Other Changes
|
Other Changes
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ import javax.xml.xpath.XPathConstants;
|
||||||
import javax.xml.xpath.XPathExpressionException;
|
import javax.xml.xpath.XPathExpressionException;
|
||||||
import javax.xml.xpath.XPathFactory;
|
import javax.xml.xpath.XPathFactory;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.lucene.util.IOUtils;
|
import org.apache.lucene.util.IOUtils;
|
||||||
import org.apache.solr.SolrTestCaseJ4;
|
import org.apache.solr.SolrTestCaseJ4;
|
||||||
import org.apache.solr.analytics.util.AnalyticsResponseHeadings;
|
import org.apache.solr.analytics.util.AnalyticsResponseHeadings;
|
||||||
|
|
|
@ -25,7 +25,7 @@ import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.lucene.document.Document;
|
import org.apache.lucene.document.Document;
|
||||||
import org.apache.lucene.index.IndexableField;
|
import org.apache.lucene.index.IndexableField;
|
||||||
import org.apache.solr.common.SolrDocument;
|
import org.apache.solr.common.SolrDocument;
|
||||||
|
|
|
@ -27,11 +27,11 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
import org.apache.commons.lang.ObjectUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.lucene.search.Query;
|
import org.apache.lucene.search.Query;
|
||||||
import org.apache.solr.common.SolrDocument;
|
import org.apache.solr.common.SolrDocument;
|
||||||
import org.apache.solr.common.SolrDocumentList;
|
import org.apache.solr.common.SolrDocumentList;
|
||||||
|
@ -388,7 +388,7 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
|
||||||
|
|
||||||
// Create a Carrot2 document
|
// Create a Carrot2 document
|
||||||
Document carrotDocument = new Document(getConcatenated(sdoc, titleFieldSpec),
|
Document carrotDocument = new Document(getConcatenated(sdoc, titleFieldSpec),
|
||||||
snippet, ObjectUtils.toString(sdoc.getFieldValue(urlField), ""));
|
snippet, Objects.toString(sdoc.getFieldValue(urlField), ""));
|
||||||
|
|
||||||
// Store Solr id of the document, we need it to map document instances
|
// Store Solr id of the document, we need it to map document instances
|
||||||
// found in clusters back to identifiers.
|
// found in clusters back to identifiers.
|
||||||
|
@ -401,7 +401,7 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
|
||||||
|
|
||||||
// Use the first Carrot2-supported language
|
// Use the first Carrot2-supported language
|
||||||
for (Object l : languages) {
|
for (Object l : languages) {
|
||||||
String lang = ObjectUtils.toString(l, "");
|
String lang = Objects.toString(l, "");
|
||||||
|
|
||||||
if (languageCodeMap.containsKey(lang)) {
|
if (languageCodeMap.containsKey(lang)) {
|
||||||
lang = languageCodeMap.get(lang);
|
lang = languageCodeMap.get(lang);
|
||||||
|
@ -475,7 +475,7 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
|
||||||
// Join multiple values with a period so that Carrot2 does not pick up
|
// Join multiple values with a period so that Carrot2 does not pick up
|
||||||
// phrases that cross field value boundaries (in most cases it would
|
// phrases that cross field value boundaries (in most cases it would
|
||||||
// create useless phrases).
|
// create useless phrases).
|
||||||
result.append(ObjectUtils.toString(ite.next())).append(" . ");
|
result.append(Objects.toString(ite.next(), "")).append(" . ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result.toString().trim();
|
return result.toString().trim();
|
||||||
|
|
|
@ -32,7 +32,6 @@ import java.util.SortedMap;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.solr.common.params.CommonParams;
|
import org.apache.solr.common.params.CommonParams;
|
||||||
import org.apache.solr.common.util.ContentStream;
|
import org.apache.solr.common.util.ContentStream;
|
||||||
import org.apache.solr.common.util.ContentStreamBase;
|
import org.apache.solr.common.util.ContentStreamBase;
|
||||||
|
@ -411,7 +410,7 @@ public class TestRerankBase extends RestTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
loadModel(name, LinearModel.class.getCanonicalName(), features,
|
loadModel(name, LinearModel.class.getCanonicalName(), features,
|
||||||
"{\"weights\":{" + StringUtils.join(weights, ",") + "}}");
|
"{\"weights\":{" + String.join(",", weights) + "}}");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void bulkIndex() throws Exception {
|
protected static void bulkIndex() throws Exception {
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
</configurations>
|
</configurations>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency org="commons-collections" name="commons-collections" rev="${/commons-collections/commons-collections}" conf="compile"/>
|
<dependency org="commons-collections" name="commons-collections" rev="${/commons-collections/commons-collections}" conf="compile"/>
|
||||||
|
<dependency org="commons-lang" name="commons-lang" rev="${/commons-lang/commons-lang}" conf="compile"/>
|
||||||
<dependency org="org.apache.velocity" name="velocity" rev="${/org.apache.velocity/velocity}" conf="compile"/>
|
<dependency org="org.apache.velocity" name="velocity" rev="${/org.apache.velocity/velocity}" conf="compile"/>
|
||||||
<dependency org="org.apache.velocity" name="velocity-tools" rev="${/org.apache.velocity/velocity-tools}" conf="compile"/>
|
<dependency org="org.apache.velocity" name="velocity-tools" rev="${/org.apache.velocity/velocity-tools}" conf="compile"/>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.solr.client.solrj.SolrResponse;
|
import org.apache.solr.client.solrj.SolrResponse;
|
||||||
import org.apache.solr.client.solrj.response.QueryResponse;
|
import org.apache.solr.client.solrj.response.QueryResponse;
|
||||||
import org.apache.solr.client.solrj.response.SolrResponseBase;
|
import org.apache.solr.client.solrj.response.SolrResponseBase;
|
||||||
|
@ -338,7 +337,7 @@ public class VelocityResponseWriter implements QueryResponseWriter, SolrCoreAwar
|
||||||
loaders.add("builtin");
|
loaders.add("builtin");
|
||||||
engine.setProperty("builtin.resource.loader.instance", new ClasspathResourceLoader());
|
engine.setProperty("builtin.resource.loader.instance", new ClasspathResourceLoader());
|
||||||
|
|
||||||
engine.setProperty(RuntimeConstants.RESOURCE_LOADER, StringUtils.join(loaders,','));
|
engine.setProperty(RuntimeConstants.RESOURCE_LOADER, String.join(",", loaders));
|
||||||
|
|
||||||
engine.setProperty(RuntimeConstants.INPUT_ENCODING, "UTF-8");
|
engine.setProperty(RuntimeConstants.INPUT_ENCODING, "UTF-8");
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<dependency org="org.apache.commons" name="commons-exec" rev="${/org.apache.commons/commons-exec}" conf="compile"/>
|
<dependency org="org.apache.commons" name="commons-exec" rev="${/org.apache.commons/commons-exec}" conf="compile"/>
|
||||||
<dependency org="commons-fileupload" name="commons-fileupload" rev="${/commons-fileupload/commons-fileupload}" conf="compile"/>
|
<dependency org="commons-fileupload" name="commons-fileupload" rev="${/commons-fileupload/commons-fileupload}" conf="compile"/>
|
||||||
<dependency org="commons-cli" name="commons-cli" rev="${/commons-cli/commons-cli}" conf="compile"/>
|
<dependency org="commons-cli" name="commons-cli" rev="${/commons-cli/commons-cli}" conf="compile"/>
|
||||||
<dependency org="commons-lang" name="commons-lang" rev="${/commons-lang/commons-lang}" conf="compile"/>
|
<dependency org="org.apache.commons" name="commons-text" rev="${/org.apache.commons/commons-text}" conf="compile"/>
|
||||||
<dependency org="com.google.guava" name="guava" rev="${/com.google.guava/guava}" conf="compile"/>
|
<dependency org="com.google.guava" name="guava" rev="${/com.google.guava/guava}" conf="compile"/>
|
||||||
<dependency org="org.locationtech.spatial4j" name="spatial4j" rev="${/org.locationtech.spatial4j/spatial4j}" conf="compile"/>
|
<dependency org="org.locationtech.spatial4j" name="spatial4j" rev="${/org.locationtech.spatial4j/spatial4j}" conf="compile"/>
|
||||||
<dependency org="org.antlr" name="antlr4-runtime" rev="${/org.antlr/antlr4-runtime}"/>
|
<dependency org="org.antlr" name="antlr4-runtime" rev="${/org.antlr/antlr4-runtime}"/>
|
||||||
|
|
|
@ -28,7 +28,7 @@ import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.cloud.api.collections.OverseerCollectionMessageHandler;
|
import org.apache.solr.cloud.api.collections.OverseerCollectionMessageHandler;
|
||||||
import org.apache.solr.cloud.overseer.ClusterStateMutator;
|
import org.apache.solr.cloud.overseer.ClusterStateMutator;
|
||||||
import org.apache.solr.cloud.overseer.CollectionMutator;
|
import org.apache.solr.cloud.overseer.CollectionMutator;
|
||||||
|
|
|
@ -53,7 +53,7 @@ import java.util.concurrent.TimeoutException;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.client.solrj.cloud.SolrCloudManager;
|
import org.apache.solr.client.solrj.cloud.SolrCloudManager;
|
||||||
import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
||||||
import org.apache.solr.client.solrj.impl.HttpSolrClient;
|
import org.apache.solr.client.solrj.impl.HttpSolrClient;
|
||||||
|
|
|
@ -32,7 +32,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.client.solrj.cloud.SolrCloudManager;
|
import org.apache.solr.client.solrj.cloud.SolrCloudManager;
|
||||||
import org.apache.solr.client.solrj.cloud.autoscaling.PolicyHelper;
|
import org.apache.solr.client.solrj.cloud.autoscaling.PolicyHelper;
|
||||||
import org.apache.solr.cloud.ActiveReplicaWatcher;
|
import org.apache.solr.cloud.ActiveReplicaWatcher;
|
||||||
|
|
|
@ -33,7 +33,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.client.solrj.SolrResponse;
|
import org.apache.solr.client.solrj.SolrResponse;
|
||||||
import org.apache.solr.client.solrj.SolrServerException;
|
import org.apache.solr.client.solrj.SolrServerException;
|
||||||
import org.apache.solr.client.solrj.cloud.DistribStateManager;
|
import org.apache.solr.client.solrj.cloud.DistribStateManager;
|
||||||
|
|
|
@ -27,7 +27,7 @@ import java.util.NoSuchElementException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.client.solrj.cloud.DistribStateManager;
|
import org.apache.solr.client.solrj.cloud.DistribStateManager;
|
||||||
import org.apache.solr.client.solrj.cloud.SolrCloudManager;
|
import org.apache.solr.client.solrj.cloud.SolrCloudManager;
|
||||||
import org.apache.solr.client.solrj.cloud.autoscaling.VersionedData;
|
import org.apache.solr.client.solrj.cloud.autoscaling.VersionedData;
|
||||||
|
|
|
@ -32,7 +32,7 @@ import java.util.Properties;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.cloud.CloudDescriptor;
|
import org.apache.solr.cloud.CloudDescriptor;
|
||||||
import org.apache.solr.common.SolrException;
|
import org.apache.solr.common.SolrException;
|
||||||
import org.apache.solr.util.PropertiesUtil;
|
import org.apache.solr.util.PropertiesUtil;
|
||||||
|
|
|
@ -29,7 +29,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.lucene.analysis.Analyzer;
|
import org.apache.lucene.analysis.Analyzer;
|
||||||
import org.apache.lucene.analysis.TokenStream;
|
import org.apache.lucene.analysis.TokenStream;
|
||||||
import org.apache.lucene.analysis.Tokenizer;
|
import org.apache.lucene.analysis.Tokenizer;
|
||||||
|
|
|
@ -38,7 +38,7 @@ import java.util.stream.Collectors;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.api.Api;
|
import org.apache.solr.api.Api;
|
||||||
import org.apache.solr.client.solrj.SolrResponse;
|
import org.apache.solr.client.solrj.SolrResponse;
|
||||||
import org.apache.solr.client.solrj.impl.HttpSolrClient;
|
import org.apache.solr.client.solrj.impl.HttpSolrClient;
|
||||||
|
|
|
@ -28,7 +28,7 @@ import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipInputStream;
|
import java.util.zip.ZipInputStream;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.hadoop.fs.Path;
|
import org.apache.hadoop.fs.Path;
|
||||||
import org.apache.solr.api.Api;
|
import org.apache.solr.api.Api;
|
||||||
import org.apache.solr.client.solrj.SolrResponse;
|
import org.apache.solr.client.solrj.SolrResponse;
|
||||||
|
|
|
@ -28,7 +28,7 @@ import java.util.Map;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.api.Api;
|
import org.apache.solr.api.Api;
|
||||||
import org.apache.solr.cloud.CloudDescriptor;
|
import org.apache.solr.cloud.CloudDescriptor;
|
||||||
import org.apache.solr.cloud.ZkController;
|
import org.apache.solr.cloud.ZkController;
|
||||||
|
|
|
@ -23,7 +23,7 @@ import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.cloud.CloudDescriptor;
|
import org.apache.solr.cloud.CloudDescriptor;
|
||||||
import org.apache.solr.cloud.ZkController;
|
import org.apache.solr.cloud.ZkController;
|
||||||
import org.apache.solr.common.SolrException;
|
import org.apache.solr.common.SolrException;
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.cloud.LeaderElector;
|
import org.apache.solr.cloud.LeaderElector;
|
||||||
import org.apache.solr.cloud.OverseerTaskProcessor;
|
import org.apache.solr.cloud.OverseerTaskProcessor;
|
||||||
import org.apache.solr.cloud.overseer.SliceMutator;
|
import org.apache.solr.cloud.overseer.SliceMutator;
|
||||||
|
|
|
@ -30,8 +30,8 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.lucene.util.BytesRef;
|
import org.apache.lucene.util.BytesRef;
|
||||||
import org.apache.lucene.util.FixedBitSet;
|
import org.apache.lucene.util.FixedBitSet;
|
||||||
import org.apache.solr.client.solrj.util.ClientUtils;
|
import org.apache.solr.client.solrj.util.ClientUtils;
|
||||||
|
|
|
@ -38,7 +38,7 @@ import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.SynchronousQueue;
|
import java.util.concurrent.SynchronousQueue;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.http.client.HttpClient;
|
import org.apache.http.client.HttpClient;
|
||||||
import org.apache.solr.client.solrj.SolrClient;
|
import org.apache.solr.client.solrj.SolrClient;
|
||||||
import org.apache.solr.client.solrj.SolrRequest;
|
import org.apache.solr.client.solrj.SolrRequest;
|
||||||
|
|
|
@ -28,7 +28,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.lucene.index.LeafReaderContext;
|
import org.apache.lucene.index.LeafReaderContext;
|
||||||
import org.apache.lucene.queries.function.FunctionQuery;
|
import org.apache.lucene.queries.function.FunctionQuery;
|
||||||
import org.apache.lucene.queries.function.ValueSource;
|
import org.apache.lucene.queries.function.ValueSource;
|
||||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.solr.request;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
import org.apache.lucene.util.BytesRef;
|
import org.apache.lucene.util.BytesRef;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of {@link Predicate} which returns true if the BytesRef contains a given substring.
|
* An implementation of {@link Predicate} which returns true if the BytesRef contains a given substring.
|
||||||
|
|
|
@ -32,7 +32,7 @@ import com.carrotsearch.hppc.IntIntHashMap;
|
||||||
import com.carrotsearch.hppc.IntLongHashMap;
|
import com.carrotsearch.hppc.IntLongHashMap;
|
||||||
import com.carrotsearch.hppc.cursors.IntIntCursor;
|
import com.carrotsearch.hppc.cursors.IntIntCursor;
|
||||||
import com.carrotsearch.hppc.cursors.IntLongCursor;
|
import com.carrotsearch.hppc.cursors.IntLongCursor;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.lucene.codecs.DocValuesProducer;
|
import org.apache.lucene.codecs.DocValuesProducer;
|
||||||
import org.apache.lucene.index.DocValues;
|
import org.apache.lucene.index.DocValues;
|
||||||
import org.apache.lucene.index.DocValuesType;
|
import org.apache.lucene.index.DocValuesType;
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.lucene.index.ExitableDirectoryReader;
|
import org.apache.lucene.index.ExitableDirectoryReader;
|
||||||
import org.apache.lucene.index.IndexableField;
|
import org.apache.lucene.index.IndexableField;
|
||||||
import org.apache.lucene.queries.function.FunctionQuery;
|
import org.apache.lucene.queries.function.FunctionQuery;
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.apache.solr.common.util.NamedList;
|
||||||
import org.apache.solr.request.SolrQueryRequest;
|
import org.apache.solr.request.SolrQueryRequest;
|
||||||
import org.apache.solr.handler.component.SearchHandler; // jdoc
|
import org.apache.solr.handler.component.SearchHandler; // jdoc
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>A QParserPlugin that acts like a "switch/case" statement.</p>
|
* <p>A QParserPlugin that acts like a "switch/case" statement.</p>
|
||||||
|
|
|
@ -525,7 +525,7 @@ public class JWTAuthPlugin extends AuthenticationPlugin implements SpecProvider,
|
||||||
wwwAuthParams.add("error=\"" + responseError + "\"");
|
wwwAuthParams.add("error=\"" + responseError + "\"");
|
||||||
wwwAuthParams.add("error_description=\"" + message + "\"");
|
wwwAuthParams.add("error_description=\"" + message + "\"");
|
||||||
}
|
}
|
||||||
response.addHeader(HttpHeaders.WWW_AUTHENTICATE, org.apache.commons.lang.StringUtils.join(wwwAuthParams, ", "));
|
response.addHeader(HttpHeaders.WWW_AUTHENTICATE, String.join(", ", wwwAuthParams));
|
||||||
response.addHeader(AuthenticationPlugin.HTTP_HEADER_X_SOLR_AUTHDATA, generateAuthDataHeader());
|
response.addHeader(AuthenticationPlugin.HTTP_HEADER_X_SOLR_AUTHDATA, generateAuthDataHeader());
|
||||||
response.sendError(httpCode, message);
|
response.sendError(httpCode, message);
|
||||||
log.info("JWT Authentication attempt failed: {}", message);
|
log.info("JWT Authentication attempt failed: {}", message);
|
||||||
|
|
|
@ -20,8 +20,6 @@ import java.io.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.apache.commons.lang.NotImplementedException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for PrintWriter that delegates to constructor arg
|
* Wrapper for PrintWriter that delegates to constructor arg
|
||||||
*/
|
*/
|
||||||
|
@ -55,7 +53,7 @@ public class PrintWriterWrapper extends PrintWriter {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void clearError() {
|
protected void clearError() {
|
||||||
throw new NotImplementedException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -75,7 +73,7 @@ public class PrintWriterWrapper extends PrintWriter {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PrintWriter format(String format, Object... args) {
|
public PrintWriter format(String format, Object... args) {
|
||||||
throw new NotImplementedException("Forbidden API");
|
throw new UnsupportedOperationException("Forbidden API");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -130,7 +128,7 @@ public class PrintWriterWrapper extends PrintWriter {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PrintWriter printf(String format, Object... args) {
|
public PrintWriter printf(String format, Object... args) {
|
||||||
throw new NotImplementedException("Forbidden API");
|
throw new UnsupportedOperationException("Forbidden API");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -185,7 +183,7 @@ public class PrintWriterWrapper extends PrintWriter {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setError() {
|
protected void setError() {
|
||||||
throw new NotImplementedException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -39,7 +39,7 @@ import java.util.Set;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.http.Header;
|
import org.apache.http.Header;
|
||||||
import org.apache.http.HeaderIterator;
|
import org.apache.http.HeaderIterator;
|
||||||
import org.apache.http.HttpEntity;
|
import org.apache.http.HttpEntity;
|
||||||
|
|
|
@ -18,8 +18,8 @@ package org.apache.solr.servlet;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.io.output.CloseShieldOutputStream;
|
import org.apache.commons.io.output.CloseShieldOutputStream;
|
||||||
import org.apache.commons.lang.StringEscapeUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.text.StringEscapeUtils;
|
||||||
import org.apache.solr.common.params.CommonParams;
|
import org.apache.solr.common.params.CommonParams;
|
||||||
import org.apache.solr.core.CoreContainer;
|
import org.apache.solr.core.CoreContainer;
|
||||||
import org.apache.solr.core.SolrCore;
|
import org.apache.solr.core.SolrCore;
|
||||||
|
@ -71,9 +71,9 @@ public final class LoadAdminUiServlet extends BaseSolrServlet {
|
||||||
"${version}"
|
"${version}"
|
||||||
};
|
};
|
||||||
String[] replace = new String[] {
|
String[] replace = new String[] {
|
||||||
StringEscapeUtils.escapeJavaScript(request.getContextPath()),
|
StringEscapeUtils.escapeEcmaScript(request.getContextPath()),
|
||||||
StringEscapeUtils.escapeJavaScript(CommonParams.CORES_HANDLER_PATH),
|
StringEscapeUtils.escapeEcmaScript(CommonParams.CORES_HANDLER_PATH),
|
||||||
StringEscapeUtils.escapeJavaScript(pack.getSpecificationVersion())
|
StringEscapeUtils.escapeEcmaScript(pack.getSpecificationVersion())
|
||||||
};
|
};
|
||||||
|
|
||||||
out.write( StringUtils.replaceEach(html, search, replace) );
|
out.write( StringUtils.replaceEach(html, search, replace) );
|
||||||
|
|
|
@ -54,7 +54,7 @@ import com.codahale.metrics.jvm.GarbageCollectorMetricSet;
|
||||||
import com.codahale.metrics.jvm.MemoryUsageGaugeSet;
|
import com.codahale.metrics.jvm.MemoryUsageGaugeSet;
|
||||||
import com.codahale.metrics.jvm.ThreadStatesGaugeSet;
|
import com.codahale.metrics.jvm.ThreadStatesGaugeSet;
|
||||||
import org.apache.commons.io.FileCleaningTracker;
|
import org.apache.commons.io.FileCleaningTracker;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.http.client.HttpClient;
|
import org.apache.http.client.HttpClient;
|
||||||
import org.apache.lucene.util.Version;
|
import org.apache.lucene.util.Version;
|
||||||
import org.apache.solr.api.V2HttpCall;
|
import org.apache.solr.api.V2HttpCall;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.solr.update.processor;
|
package org.apache.solr.update.processor;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.common.SolrInputField;
|
import org.apache.solr.common.SolrInputField;
|
||||||
import org.apache.solr.common.util.NamedList;
|
import org.apache.solr.common.util.NamedList;
|
||||||
import org.apache.solr.core.SolrCore;
|
import org.apache.solr.core.SolrCore;
|
||||||
|
|
|
@ -36,7 +36,7 @@ import java.util.LinkedHashMap;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.lang.LocaleUtils;
|
import org.apache.commons.lang3.LocaleUtils;
|
||||||
import org.apache.solr.common.SolrException;
|
import org.apache.solr.common.SolrException;
|
||||||
import org.apache.solr.common.util.NamedList;
|
import org.apache.solr.common.util.NamedList;
|
||||||
import org.apache.solr.core.SolrCore;
|
import org.apache.solr.core.SolrCore;
|
||||||
|
@ -171,7 +171,7 @@ public class ParseDateFieldUpdateProcessorFactory extends FieldMutatingUpdatePro
|
||||||
if (null != localeParam) {
|
if (null != localeParam) {
|
||||||
locale = LocaleUtils.toLocale(localeParam);
|
locale = LocaleUtils.toLocale(localeParam);
|
||||||
} else {
|
} else {
|
||||||
locale = LocaleUtils.toLocale("en_US"); // because well-known patterns assume this
|
locale = Locale.US; // because well-known patterns assume this
|
||||||
}
|
}
|
||||||
|
|
||||||
Object defaultTimeZoneParam = args.remove(DEFAULT_TIME_ZONE_PARAM);
|
Object defaultTimeZoneParam = args.remove(DEFAULT_TIME_ZONE_PARAM);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.solr.update.processor;
|
package org.apache.solr.update.processor;
|
||||||
|
|
||||||
import org.apache.commons.lang.LocaleUtils;
|
import org.apache.commons.lang3.LocaleUtils;
|
||||||
import org.apache.solr.common.util.NamedList;
|
import org.apache.solr.common.util.NamedList;
|
||||||
import org.apache.solr.core.SolrCore;
|
import org.apache.solr.core.SolrCore;
|
||||||
import org.apache.solr.schema.FieldType;
|
import org.apache.solr.schema.FieldType;
|
||||||
|
|
|
@ -27,7 +27,6 @@ import org.apache.solr.request.LocalSolrQueryRequest;
|
||||||
import org.apache.solr.response.SolrQueryResponse;
|
import org.apache.solr.response.SolrQueryResponse;
|
||||||
import org.apache.solr.update.*;
|
import org.apache.solr.update.*;
|
||||||
import org.apache.solr.util.plugin.SolrCoreAware;
|
import org.apache.solr.util.plugin.SolrCoreAware;
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
|
||||||
|
@ -352,7 +351,7 @@ public class StatelessScriptUpdateProcessorFactory extends UpdateRequestProcesso
|
||||||
engines.addAll(f.getNames());
|
engines.addAll(f.getNames());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result = StringUtils.join(engines, ", ");
|
result = String.join(", ", engines);
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
/* :NOOP: */
|
/* :NOOP: */
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.solr.update.processor;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.common.util.NamedList;
|
import org.apache.solr.common.util.NamedList;
|
||||||
import org.apache.solr.request.SolrQueryRequest;
|
import org.apache.solr.request.SolrQueryRequest;
|
||||||
import org.apache.solr.response.SolrQueryResponse;
|
import org.apache.solr.response.SolrQueryResponse;
|
||||||
|
|
|
@ -78,8 +78,7 @@ import org.apache.commons.exec.OS;
|
||||||
import org.apache.commons.exec.environment.EnvironmentUtils;
|
import org.apache.commons.exec.environment.EnvironmentUtils;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang.BooleanUtils;
|
import org.apache.commons.lang3.SystemUtils;
|
||||||
import org.apache.commons.lang.SystemUtils;
|
|
||||||
import org.apache.http.HttpEntity;
|
import org.apache.http.HttpEntity;
|
||||||
import org.apache.http.HttpResponse;
|
import org.apache.http.HttpResponse;
|
||||||
import org.apache.http.NoHttpResponseException;
|
import org.apache.http.NoHttpResponseException;
|
||||||
|
@ -4093,8 +4092,7 @@ public class SolrCLI {
|
||||||
private void ensureArgumentIsValidBooleanIfPresent(CommandLine cli, String argName) {
|
private void ensureArgumentIsValidBooleanIfPresent(CommandLine cli, String argName) {
|
||||||
if (cli.hasOption(argName)) {
|
if (cli.hasOption(argName)) {
|
||||||
final String value = cli.getOptionValue(argName);
|
final String value = cli.getOptionValue(argName);
|
||||||
final Boolean parsedBoolean = BooleanUtils.toBooleanObject(value);
|
if (Boolean.parseBoolean(value)) {
|
||||||
if (parsedBoolean == null) {
|
|
||||||
echo("Argument [" + argName + "] must be either true or false, but was [" + value + "]");
|
echo("Argument [" + argName + "] must be either true or false, but was [" + value + "]");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ import java.util.concurrent.Callable;
|
||||||
import java.util.concurrent.ExecutorCompletionService;
|
import java.util.concurrent.ExecutorCompletionService;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.lucene.util.LuceneTestCase.Slow;
|
import org.apache.lucene.util.LuceneTestCase.Slow;
|
||||||
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
|
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
|
||||||
import org.apache.solr.client.solrj.SolrClient;
|
import org.apache.solr.client.solrj.SolrClient;
|
||||||
|
|
|
@ -39,7 +39,6 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.lucene.util.IOUtils;
|
import org.apache.lucene.util.IOUtils;
|
||||||
import org.apache.lucene.util.LuceneTestCase.Slow;
|
import org.apache.lucene.util.LuceneTestCase.Slow;
|
||||||
import org.apache.solr.JSONTestUtil;
|
import org.apache.solr.JSONTestUtil;
|
||||||
|
@ -540,7 +539,7 @@ public class BasicDistributedZkTest extends AbstractFullDistribZkTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// any combination of replica alternatives should give same numDocs
|
// any combination of replica alternatives should give same numDocs
|
||||||
String replicas = StringUtils.join(replicaAlts.toArray(), "|");
|
String replicas = String.join("|", replicaAlts);
|
||||||
query.set("shards", replicas);
|
query.set("shards", replicas);
|
||||||
numDocs = client.query(query).getResults().getNumFound();
|
numDocs = client.query(query).getResults().getNumFound();
|
||||||
assertTrue("numDocs < 0 for replicas "+replicas+" via "+client,
|
assertTrue("numDocs < 0 for replicas "+replicas+" via "+client,
|
||||||
|
@ -571,11 +570,11 @@ public class BasicDistributedZkTest extends AbstractFullDistribZkTestBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Collections.shuffle(replicas, random());
|
Collections.shuffle(replicas, random());
|
||||||
randomShards.add(StringUtils.join(replicas, "|"));
|
randomShards.add(String.join("|", replicas));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String randShards = StringUtils.join(randomShards, ",");
|
String randShards = String.join(",", randomShards);
|
||||||
query.set("shards", randShards);
|
query.set("shards", randShards);
|
||||||
for (SolrClient client : this.clients) {
|
for (SolrClient client : this.clients) {
|
||||||
assertEquals("numDocs for "+randShards+" via "+client,
|
assertEquals("numDocs for "+randShards+" via "+client,
|
||||||
|
|
|
@ -25,7 +25,6 @@ import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.solr.client.solrj.SolrServerException;
|
import org.apache.solr.client.solrj.SolrServerException;
|
||||||
import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
||||||
import org.apache.solr.client.solrj.impl.HttpSolrClient;
|
import org.apache.solr.client.solrj.impl.HttpSolrClient;
|
||||||
|
@ -98,7 +97,7 @@ public class DistribJoinFromCollectionTest extends SolrCloudTestCase{
|
||||||
|
|
||||||
// deploy the "from" collection to all nodes where the "to" collection exists
|
// deploy the "from" collection to all nodes where the "to" collection exists
|
||||||
CollectionAdminRequest.createCollection(fromColl, configName, 1, 4)
|
CollectionAdminRequest.createCollection(fromColl, configName, 1, 4)
|
||||||
.setCreateNodeSet(StringUtils.join(nodeSet, ","))
|
.setCreateNodeSet(String.join(",", nodeSet))
|
||||||
.setProperties(collectionProperties)
|
.setProperties(collectionProperties)
|
||||||
.process(cluster.getSolrClient());
|
.process(cluster.getSolrClient());
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.apache.commons.codec.digest.DigestUtils;
|
import org.apache.commons.codec.digest.DigestUtils;
|
||||||
import org.apache.commons.lang.RandomStringUtils;
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
import org.apache.lucene.util.LuceneTestCase.Slow;
|
import org.apache.lucene.util.LuceneTestCase.Slow;
|
||||||
import org.apache.solr.client.solrj.SolrServerException;
|
import org.apache.solr.client.solrj.SolrServerException;
|
||||||
import org.apache.solr.client.solrj.request.UpdateRequest;
|
import org.apache.solr.client.solrj.request.UpdateRequest;
|
||||||
|
|
|
@ -34,7 +34,7 @@ import java.util.stream.Collectors;
|
||||||
import com.codahale.metrics.Counter;
|
import com.codahale.metrics.Counter;
|
||||||
import com.codahale.metrics.Metric;
|
import com.codahale.metrics.Metric;
|
||||||
import com.codahale.metrics.MetricRegistry;
|
import com.codahale.metrics.MetricRegistry;
|
||||||
import org.apache.commons.lang.RandomStringUtils;
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
import org.apache.lucene.util.LuceneTestCase.Slow;
|
import org.apache.lucene.util.LuceneTestCase.Slow;
|
||||||
import org.apache.solr.client.solrj.SolrQuery;
|
import org.apache.solr.client.solrj.SolrQuery;
|
||||||
import org.apache.solr.client.solrj.SolrServerException;
|
import org.apache.solr.client.solrj.SolrServerException;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
package org.apache.solr.cloud;
|
package org.apache.solr.cloud;
|
||||||
|
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.lucene.util.LuceneTestCase.Slow;
|
import org.apache.lucene.util.LuceneTestCase.Slow;
|
||||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
||||||
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
|
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
|
||||||
|
|
|
@ -26,7 +26,6 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.lucene.util.TestUtil;
|
import org.apache.lucene.util.TestUtil;
|
||||||
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
|
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
|
||||||
import org.apache.solr.client.solrj.SolrServerException;
|
import org.apache.solr.client.solrj.SolrServerException;
|
||||||
|
@ -496,7 +495,7 @@ public class TestCloudPivotFacet extends AbstractFullDistribZkTestBase {
|
||||||
// makes it a robust test (especially for multi-valued fields)
|
// makes it a robust test (especially for multi-valued fields)
|
||||||
fields[i] = fieldNames[TestUtil.nextInt(random(),0,fieldNames.length-1)];
|
fields[i] = fieldNames[TestUtil.nextInt(random(),0,fieldNames.length-1)];
|
||||||
}
|
}
|
||||||
return StringUtils.join(fields, ",");
|
return String.join(",", fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -27,7 +27,6 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.lucene.util.TestUtil;
|
import org.apache.lucene.util.TestUtil;
|
||||||
import org.apache.solr.client.solrj.SolrClient;
|
import org.apache.solr.client.solrj.SolrClient;
|
||||||
import org.apache.solr.client.solrj.SolrServerException;
|
import org.apache.solr.client.solrj.SolrServerException;
|
||||||
|
@ -732,7 +731,7 @@ public class TestCloudPseudoReturnFields extends SolrCloudTestCase {
|
||||||
|
|
||||||
Collections.shuffle(fl, random);
|
Collections.shuffle(fl, random);
|
||||||
|
|
||||||
final SolrParams singleFl = params("q","*:*", "rows", "1","fl",StringUtils.join(fl.toArray(),','));
|
final SolrParams singleFl = params("q","*:*", "rows", "1","fl",String.join(",", fl));
|
||||||
final ModifiableSolrParams multiFl = params("q","*:*", "rows", "1");
|
final ModifiableSolrParams multiFl = params("q","*:*", "rows", "1");
|
||||||
for (String item : fl) {
|
for (String item : fl) {
|
||||||
multiFl.add("fl",item);
|
multiFl.add("fl",item);
|
||||||
|
@ -767,7 +766,7 @@ public class TestCloudPseudoReturnFields extends SolrCloudTestCase {
|
||||||
|
|
||||||
Collections.shuffle(fl, random);
|
Collections.shuffle(fl, random);
|
||||||
|
|
||||||
final SolrParams singleFl = params("fl",StringUtils.join(fl.toArray(),','));
|
final SolrParams singleFl = params("fl",String.join(",", fl));
|
||||||
final ModifiableSolrParams multiFl = params();
|
final ModifiableSolrParams multiFl = params();
|
||||||
for (String item : fl) {
|
for (String item : fl) {
|
||||||
multiFl.add("fl",item);
|
multiFl.add("fl",item);
|
||||||
|
|
|
@ -20,7 +20,6 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.lucene.util.LuceneTestCase.Slow;
|
import org.apache.lucene.util.LuceneTestCase.Slow;
|
||||||
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
|
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
|
||||||
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
|
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
|
||||||
|
@ -147,7 +146,7 @@ public class CollectionTooManyReplicasTest extends SolrCloudTestCase {
|
||||||
List<String> nodes = getAllNodeNames(collectionName);
|
List<String> nodes = getAllNodeNames(collectionName);
|
||||||
|
|
||||||
CollectionAdminRequest.createShard(collectionName, "shard4")
|
CollectionAdminRequest.createShard(collectionName, "shard4")
|
||||||
.setNodeSet(StringUtils.join(nodes, ","))
|
.setNodeSet(String.join(",", nodes))
|
||||||
.process(cluster.getSolrClient());
|
.process(cluster.getSolrClient());
|
||||||
|
|
||||||
// And just for yucks, insure we fail the "regular" one again.
|
// And just for yucks, insure we fail the "regular" one again.
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.solr.cloud.api.collections;
|
package org.apache.solr.cloud.api.collections;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.client.solrj.SolrServerException;
|
import org.apache.solr.client.solrj.SolrServerException;
|
||||||
import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
||||||
import org.apache.solr.client.solrj.request.QueryRequest;
|
import org.apache.solr.client.solrj.request.QueryRequest;
|
||||||
|
|
|
@ -30,7 +30,6 @@ import java.util.regex.Pattern;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.solr.SolrTestCaseJ4;
|
import org.apache.solr.SolrTestCaseJ4;
|
||||||
import org.apache.solr.common.SolrException;
|
import org.apache.solr.common.SolrException;
|
||||||
import org.apache.solr.common.params.CommonParams;
|
import org.apache.solr.common.params.CommonParams;
|
||||||
|
@ -736,7 +735,7 @@ public class TestLazyCores extends SolrTestCaseJ4 {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String makePath(String... args) {
|
private static final String makePath(String... args) {
|
||||||
return StringUtils.join(args, File.separator);
|
return String.join(File.separator, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -18,7 +18,7 @@ package org.apache.solr.handler;
|
||||||
|
|
||||||
import org.apache.solr.SolrTestCaseJ4;
|
import org.apache.solr.SolrTestCaseJ4;
|
||||||
import org.apache.solr.common.util.NamedList;
|
import org.apache.solr.common.util.NamedList;
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A base class for all analysis request handler tests.
|
* A base class for all analysis request handler tests.
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.solr.handler;
|
package org.apache.solr.handler;
|
||||||
|
|
||||||
import org.apache.commons.lang.ObjectUtils;
|
|
||||||
import org.apache.solr.SolrTestCaseJ4;
|
import org.apache.solr.SolrTestCaseJ4;
|
||||||
import org.apache.solr.common.SolrInputDocument;
|
import org.apache.solr.common.SolrInputDocument;
|
||||||
import org.apache.solr.common.util.ContentStreamBase;
|
import org.apache.solr.common.util.ContentStreamBase;
|
||||||
|
@ -37,6 +36,7 @@ import java.io.IOException;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
|
|
||||||
public class XmlUpdateRequestHandlerTest extends SolrTestCaseJ4 {
|
public class XmlUpdateRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
|
@ -223,10 +223,10 @@ public class XmlUpdateRequestHandlerTest extends SolrTestCaseJ4 {
|
||||||
DeleteUpdateCommand expected = deleteCommands.poll();
|
DeleteUpdateCommand expected = deleteCommands.poll();
|
||||||
assertNotNull("Unexpected delete command: [" + cmd + "]", expected);
|
assertNotNull("Unexpected delete command: [" + cmd + "]", expected);
|
||||||
assertTrue("Expected [" + expected + "] but found [" + cmd + "]",
|
assertTrue("Expected [" + expected + "] but found [" + cmd + "]",
|
||||||
ObjectUtils.equals(expected.id, cmd.id) &&
|
Objects.equals(expected.id, cmd.id) &&
|
||||||
ObjectUtils.equals(expected.query, cmd.query) &&
|
Objects.equals(expected.query, cmd.query) &&
|
||||||
expected.commitWithin==cmd.commitWithin &&
|
expected.commitWithin==cmd.commitWithin &&
|
||||||
ObjectUtils.equals(expected.getRoute(), cmd.getRoute()));
|
Objects.equals(expected.getRoute(), cmd.getRoute()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
package org.apache.solr.handler.component;
|
package org.apache.solr.handler.component;
|
||||||
|
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.solr.SolrJettyTestBase;
|
import org.apache.solr.SolrJettyTestBase;
|
||||||
import org.apache.solr.client.solrj.SolrClient;
|
import org.apache.solr.client.solrj.SolrClient;
|
||||||
import org.apache.solr.client.solrj.SolrQuery;
|
import org.apache.solr.client.solrj.SolrQuery;
|
||||||
|
@ -187,7 +186,7 @@ public class DistributedDebugComponentTest extends SolrJettyTestBase {
|
||||||
} else if (random().nextBoolean()) {
|
} else if (random().nextBoolean()) {
|
||||||
shards.remove(shard2);
|
shards.remove(shard2);
|
||||||
}
|
}
|
||||||
q.set("shards", StringUtils.join(shards, ","));
|
q.set("shards", String.join(",", shards));
|
||||||
|
|
||||||
|
|
||||||
List<String> debug = new ArrayList<String>(10);
|
List<String> debug = new ArrayList<String>(10);
|
||||||
|
|
|
@ -32,8 +32,8 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import org.apache.commons.lang.builder.CompareToBuilder;
|
import org.apache.commons.lang3.builder.CompareToBuilder;
|
||||||
import org.apache.commons.lang.builder.EqualsBuilder;
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
import org.apache.lucene.document.Document;
|
import org.apache.lucene.document.Document;
|
||||||
import org.apache.solr.SolrTestCaseJ4;
|
import org.apache.solr.SolrTestCaseJ4;
|
||||||
import org.apache.solr.common.params.CommonParams;
|
import org.apache.solr.common.params.CommonParams;
|
||||||
|
|
|
@ -21,7 +21,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import org.apache.lucene.document.Field;
|
import org.apache.lucene.document.Field;
|
||||||
import org.apache.lucene.document.SortedDocValuesField;
|
import org.apache.lucene.document.SortedDocValuesField;
|
||||||
|
|
|
@ -28,8 +28,6 @@ import org.apache.solr.schema.SchemaField;
|
||||||
import org.apache.solr.common.params.SolrParams;
|
import org.apache.solr.common.params.SolrParams;
|
||||||
import org.apache.solr.common.params.ModifiableSolrParams;
|
import org.apache.solr.common.params.ModifiableSolrParams;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
|
|
||||||
|
@ -691,7 +689,7 @@ public class TestPseudoReturnFields extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
Collections.shuffle(fl, random);
|
Collections.shuffle(fl, random);
|
||||||
|
|
||||||
final SolrParams singleFl = params("q","*:*", "rows", "1","fl",StringUtils.join(fl.toArray(),','));
|
final SolrParams singleFl = params("q","*:*", "rows", "1","fl",String.join(",", fl));
|
||||||
final ModifiableSolrParams multiFl = params("q","*:*", "rows", "1");
|
final ModifiableSolrParams multiFl = params("q","*:*", "rows", "1");
|
||||||
for (String item : fl) {
|
for (String item : fl) {
|
||||||
multiFl.add("fl",item);
|
multiFl.add("fl",item);
|
||||||
|
@ -725,7 +723,7 @@ public class TestPseudoReturnFields extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
Collections.shuffle(fl, random);
|
Collections.shuffle(fl, random);
|
||||||
|
|
||||||
final SolrParams singleFl = params("fl",StringUtils.join(fl.toArray(),','));
|
final SolrParams singleFl = params("fl",String.join(",", fl));
|
||||||
final ModifiableSolrParams multiFl = params();
|
final ModifiableSolrParams multiFl = params();
|
||||||
for (String item : fl) {
|
for (String item : fl) {
|
||||||
multiFl.add("fl",item);
|
multiFl.add("fl",item);
|
||||||
|
|
|
@ -29,7 +29,6 @@ import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.apache.lucene.util.TestUtil;
|
import org.apache.lucene.util.TestUtil;
|
||||||
import org.apache.solr.client.solrj.SolrClient;
|
import org.apache.solr.client.solrj.SolrClient;
|
||||||
import org.apache.solr.client.solrj.SolrServerException;
|
import org.apache.solr.client.solrj.SolrServerException;
|
||||||
|
@ -418,7 +417,7 @@ public class TestCloudJSONFacetJoinDomain extends SolrCloudTestCase {
|
||||||
// keep queries simple, just use str fields - not point of test
|
// keep queries simple, just use str fields - not point of test
|
||||||
clauses.add(strfield(fieldNum) + ":" + randFieldValue(fieldNum));
|
clauses.add(strfield(fieldNum) + ":" + randFieldValue(fieldNum));
|
||||||
}
|
}
|
||||||
return "(" + StringUtils.join(clauses, " OR ") + ")";
|
return "(" + String.join(" OR ", clauses) + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -28,8 +28,6 @@ import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
|
|
||||||
import org.apache.lucene.util.LuceneTestCase.Slow;
|
import org.apache.lucene.util.LuceneTestCase.Slow;
|
||||||
import org.apache.lucene.util.TestUtil;
|
import org.apache.lucene.util.TestUtil;
|
||||||
import org.apache.solr.client.solrj.SolrClient;
|
import org.apache.solr.client.solrj.SolrClient;
|
||||||
|
@ -300,7 +298,7 @@ public class TestCloudJSONFacetSKG extends SolrCloudTestCase {
|
||||||
|
|
||||||
private static String buildORQuery(String... clauses) {
|
private static String buildORQuery(String... clauses) {
|
||||||
assert 0 < clauses.length;
|
assert 0 < clauses.length;
|
||||||
return "(" + StringUtils.join(clauses, " OR ") + ")";
|
return "(" + String.join(" OR ", clauses) + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
680b74de9c393bbf8d9e951af301659b16845907
|
|
|
@ -0,0 +1 @@
|
||||||
|
ba72cf0c40cf701e972fe7720ae844629f4ecca2
|
|
@ -22,7 +22,7 @@ import java.io.IOException;
|
||||||
import org.apache.solr.SolrTestCase;
|
import org.apache.solr.SolrTestCase;
|
||||||
import org.apache.solr.client.solrj.impl.HttpClientUtil.SchemaRegistryProvider;
|
import org.apache.solr.client.solrj.impl.HttpClientUtil.SchemaRegistryProvider;
|
||||||
|
|
||||||
import org.apache.commons.lang.reflect.FieldUtils;
|
import org.apache.commons.lang3.reflect.FieldUtils;
|
||||||
import org.apache.http.conn.socket.ConnectionSocketFactory;
|
import org.apache.http.conn.socket.ConnectionSocketFactory;
|
||||||
import org.apache.http.conn.ssl.DefaultHostnameVerifier;
|
import org.apache.http.conn.ssl.DefaultHostnameVerifier;
|
||||||
import org.apache.http.conn.ssl.NoopHostnameVerifier;
|
import org.apache.http.conn.ssl.NoopHostnameVerifier;
|
||||||
|
|
|
@ -25,7 +25,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.solr.SolrTestCaseJ4;
|
import org.apache.solr.SolrTestCaseJ4;
|
||||||
import org.apache.solr.util.RecordingJSONParser;
|
import org.apache.solr.util.RecordingJSONParser;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue