This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit c85c3bed9aa883aa62dc0bdf606f788cfbd75448
Author: Eric Pugh <[email protected]>
AuthorDate: Fri Nov 22 07:20:16 2024 -0500

    Support backport of SOLR-17556
---
 solr/core/src/java/org/apache/solr/cli/RunExampleTool.java | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java 
b/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java
index d0b336e74ff..7ef74c5f298 100644
--- a/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java
@@ -265,7 +265,7 @@ public class RunExampleTool extends ToolBase {
     Map<String, Object> nodeStatus =
         startSolr(new File(serverDir, "solr"), isCloudMode, cli, port, zkHost, 
30);
 
-    String solrUrl = CLIUtils.normalizeSolrUrl((String) 
nodeStatus.get("baseUrl"));
+    String solrUrl = SolrCLI.normalizeSolrUrl((String) 
nodeStatus.get("baseUrl"), false);
 
     // If the example already exists then let the user know they should delete 
it, or
     // they may get unusual behaviors.
@@ -348,9 +348,7 @@ public class RunExampleTool extends ToolBase {
             "exampledocs directory not found, skipping indexing step for the 
techproducts example");
       }
     } else if ("films".equals(exampleName) && !alreadyExists) {
-      try (SolrClient solrClient =
-          CLIUtils.getSolrClient(
-              solrUrl, 
cli.getOptionValue(CommonCLIOptions.CREDENTIALS_OPTION))) {
+      try (SolrClient solrClient = SolrCLI.getSolrClient(solrUrl)) {
         echo("Adding dense vector field type to films schema");
         SolrCLI.postJsonToSolr(
             solrClient,
@@ -535,7 +533,7 @@ public class RunExampleTool extends ToolBase {
             new File(cloudDir, "node" + (n + 1) + "/solr"), true, cli, 
cloudPorts[n], zkHost, 30);
     }
 
-    String solrUrl = CLIUtils.normalizeSolrUrl((String) 
nodeStatus.get("baseUrl"), false);
+    String solrUrl = SolrCLI.normalizeSolrUrl((String) 
nodeStatus.get("baseUrl"), false);
 
     // wait until live nodes == numNodes
     waitToSeeLiveNodes(zkHost, numNodes);

Reply via email to