Skip to content

Commit

Permalink
SOLR-6572 Trim whitespace for shards.tolerant and leaderUrl (#2311)
Browse files Browse the repository at this point in the history
  • Loading branch information
janhoy authored Apr 30, 2024
1 parent f1fc03f commit 033be0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ public IndexFetcher(

private void setLeaderCoreUrl(String leaderCoreUrl) {
if (leaderCoreUrl != null) {
leaderCoreUrl = leaderCoreUrl.trim();
ClusterState clusterState =
solrCore.getCoreContainer().getZkController() == null
? null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static boolean getShardsTolerantAsBool(SolrParams params) {
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
}
}
}

0 comments on commit 033be0f

Please sign in to comment.