bszabo97 commented on code in PR #1182:
URL: https://github.com/apache/solr/pull/1182#discussion_r1028346326


##########
solr/core/src/java/org/apache/solr/util/SolrCLI.java:
##########
@@ -1059,12 +1080,38 @@ public Option[] getOptions() {
     protected void runImpl(CommandLine cli) throws Exception {
       String getUrl = cli.getOptionValue("get");
       if (getUrl != null) {
-        Map<String, Object> json = getJson(getUrl);
+        String[] urlAndParams = getUrl.split("\\?");
+        String[] getUrlSplit = urlAndParams[0].split("/");
+        String[] params = null;
+        if (urlAndParams.length > 1) {
+          params = urlAndParams[1].split("&");
+        }
+        String baseUrl = getUrlSplit[0] + "//" + getUrlSplit[2] + "/" + 
getUrlSplit[3];
+        StringBuilder getUrlBuilder = new StringBuilder();

Review Comment:
   Great suggestion, I was not familiar with this class! I have changed the 
implementation to use URI, if you could have a check if it looks better now I 
would be grateful (I still had to use some "string magic" for which I could not 
figure a nicer solution).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to