Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

remove deprecated code (#1564)

Eric Pughe132821e4c3e
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
index 7cbd38d08b8..1da2c841955 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudHttp2SolrClient.java
@@ -71,7 +71,7 @@ public class CloudHttp2SolrClient extends CloudSolrClient {
this.myClient.requestWriter = builder.requestWriter;
}
if (builder.responseParser != null) {
- this.myClient.setParser(builder.responseParser);
+ this.myClient.parser = builder.responseParser;
}
if (builder.stateProvider == null) {
if (builder.zkHosts != null && builder.solrUrls != null) {
@@ -253,7 +253,7 @@ public class CloudHttp2SolrClient extends CloudSolrClient {
* Tells {@link CloudHttp2SolrClient.Builder} that created clients can send updates to any shard
* replica (shard leaders and non-leaders).
*
- * <p>Shard leaders are still preferred, but the created clients will fallback to using other
+ * <p>Shard leaders are still preferred, but the created clients will fall back to using other
* replicas if a leader cannot be found.
*
* @see #sendDirectUpdatesToShardLeadersOnly
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
index 33489afc0d0..50075e2abce 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
@@ -947,38 +947,10 @@ public class Http2SolrClient extends SolrClient {
}
}
- /**
- * Choose the {@link RequestWriter} to use.
- *
- * <p>By default, {@link BinaryRequestWriter} is used.
- *
- * <p>Note: This setter method is <b>not thread-safe</b>.
- *
- * @deprecated use {@link Http2SolrClient.Builder#withRequestWriter(RequestWriter)} instead
- */
- @Deprecated
- public void setRequestWriter(RequestWriter requestWriter) {
- this.requestWriter = requestWriter;
- }
-
protected RequestWriter getRequestWriter() {
return requestWriter;
}
- /**
- * Configure whether the client should follow redirects or not.
- *
- * <p>This defaults to false under the assumption that if you are following a redirect to get to a
- * Solr installation, something is configured wrong somewhere.
- *
- * @deprecated use {@link Http2SolrClient.Builder#withFollowRedirects(boolean)}
- * Redirects(boolean)} instead
- */
- @Deprecated
- public void setFollowRedirects(boolean follow) {
- httpClient.setFollowRedirects(follow);
- }
-
public String getBaseURL() {
return serverBaseUrl;
}
@@ -1243,32 +1215,10 @@ public class Http2SolrClient extends SolrClient {
}
}
- /**
- * @deprecated use {@link #getUrlParamNames()}
- */
- @Deprecated
- public Set<String> getQueryParams() {
- return getUrlParamNames();
- }
-
public Set<String> getUrlParamNames() {
return urlParamNames;
}
- /**
- * Expert Method
- *
- * @param urlParamNames set of param keys that are only sent via the query string. Note that the
- * param will be sent as a query string if the key is part of this Set or the SolrRequest's
- * query params.
- * @see org.apache.solr.client.solrj.SolrRequest#getQueryParams
- * @deprecated use {@link Http2SolrClient.Builder#withTheseParamNamesInTheUrl(Set)} instead
- */
- @Deprecated
- public void setUrlParamNames(Set<String> urlParamNames) {
- this.urlParamNames = urlParamNames;
- }
-
private ModifiableSolrParams calculateQueryParams(
Set<String> queryParamNames, ModifiableSolrParams wparams) {
ModifiableSolrParams queryModParams = new ModifiableSolrParams();
@@ -1290,20 +1240,6 @@ public class Http2SolrClient extends SolrClient {
return parser;
}
- /**
- * Note: This setter method is <b>not thread-safe</b>.
- *
- * @param parser Default Response Parser chosen to parse the response if the parser were not
- * specified as part of the request.
- * @see org.apache.solr.client.solrj.SolrRequest#getResponseParser()
- * @deprecated use {@link Http2SolrClient.Builder#withResponseParser(ResponseParser)} instead
- */
- @Deprecated
- public void setParser(ResponseParser parser) {
- this.parser = parser;
- updateDefaultMimeTypeForParser();
- }
-
protected void updateDefaultMimeTypeForParser() {
defaultParserMimeTypes =
parser.getContentTypes().stream()