diff --git a/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java b/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java index ae6b974a..24a7fe8d 100644 --- a/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java +++ b/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java @@ -42,7 +42,7 @@ public class SolrManager { private List hosts; private String mode; - private SolrClient solrClient; + private final SolrClient solrClient; private final Logger logger = LoggerFactory.getLogger(SolrManager.class); @@ -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)) { @@ -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; } @@ -416,9 +405,4 @@ public SolrManager setMode(String mode) { public SolrClient getSolrClient() { return solrClient; } - - public SolrManager setSolrClient(SolrClient solrClient) { - this.solrClient = solrClient; - return this; - } }