igiguere commented on code in PR #3955:
URL: https://github.com/apache/solr/pull/3955#discussion_r2631473604


##########
solr/core/src/java/org/apache/solr/cli/CreateTool.java:
##########
@@ -157,14 +156,10 @@ protected void createCore(CommandLine cli, SolrClient 
solrClient) throws Excepti
     }
     printDefaultConfigsetWarningIfNecessary(cli);
 
-    String coreRootDirectory; // usually same as solr home, but not always
-
-    NamedList<?> systemInfo =
-        solrClient.request(
-            new GenericSolrRequest(SolrRequest.METHOD.GET, 
CommonParams.SYSTEM_INFO_PATH));
-
-    // convert raw JSON into user-friendly output
-    coreRootDirectory = (String) systemInfo.get("core_root");
+    SystemInfoResponse sysResponse = (new 
SystemInfoRequest()).process(solrClient);
+    // usually same as solr home, but not always
+    String coreRootDirectory =

Review Comment:
   No idea.  Just being cautious.  Although, the original code did not check 
for null, so I guess the new code shouldn't need to.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to