Skip to content

Commit

Permalink
datastore: use final for solrClient, #TASK-6981
Browse files Browse the repository at this point in the history
  • Loading branch information
jtarraga committed Sep 30, 2024
1 parent b49926c commit 444088d
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class SolrManager {

private List<String> hosts;
private String mode;
private SolrClient solrClient;
private final SolrClient solrClient;

private final Logger logger = LoggerFactory.getLogger(SolrManager.class);

Expand Down Expand Up @@ -80,13 +80,6 @@ public SolrManager(SolrClient solrClient, String host, String mode) {
this.mode = mode;
}

// @Deprecated
// public SolrManager(SolrClient solrClient, String host, String mode, int timeout) {
// this.solrClient = solrClient;
// this.hosts = Collectionshost;
// this.mode = mode;
// }

public SolrCollection getCollection(String collection) throws SolrException {
checkIsAlive();
if (!exists(collection)) {
Expand Down Expand Up @@ -358,10 +351,6 @@ public SolrClient newSolrClient(int timeout) {
}
}

// Sanity check
if (solrClient == null) {
throw new IllegalArgumentException("Can not build a Solr client, please, check Solr configuration");
}
return solrClient;
}

Expand Down Expand Up @@ -416,9 +405,4 @@ public SolrManager setMode(String mode) {
public SolrClient getSolrClient() {
return solrClient;
}

public SolrManager setSolrClient(SolrClient solrClient) {
this.solrClient = solrClient;
return this;
}
}

0 comments on commit 444088d

Please sign in to comment.