Apache Solr open-source search software
SOLR-6572 Trim whitespace for shards.tolerant and leaderUrl (#2311)
Jan Høydahl033be0fc1317
diff --git a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.javaindex b06353fcaeb..b347565450a 100644--- a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java+++ b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java@@ -328,6 +328,7 @@ public class IndexFetcher {private void setLeaderCoreUrl(String leaderCoreUrl) {if (leaderCoreUrl != null) {+ leaderCoreUrl = leaderCoreUrl.trim();ClusterState clusterState =solrCore.getCoreContainer().getZkController() == null? nulldiff --git a/solr/solrj/src/java/org/apache/solr/common/params/ShardParams.java b/solr/solrj/src/java/org/apache/solr/common/params/ShardParams.javaindex 8a6b87577ec..875b17c87fe 100644--- a/solr/solrj/src/java/org/apache/solr/common/params/ShardParams.java+++ b/solr/solrj/src/java/org/apache/solr/common/params/ShardParams.java@@ -123,7 +123,7 @@ public interface ShardParams {if (null == shardsTolerantValue || shardsTolerantValue.equals(REQUIRE_ZK_CONNECTED)) {return false;} else {- return StrUtils.parseBool(shardsTolerantValue); // throw an exception if non-boolean+ return StrUtils.parseBool(shardsTolerantValue.trim()); // throw an exception if non-boolean}}}