malliaridis commented on code in PR #2761:
URL: https://github.com/apache/solr/pull/2761#discussion_r1799701043
##########
solr/core/src/java/org/apache/solr/cli/DeleteTool.java:
##########
@@ -198,13 +187,13 @@ protected void deleteCollection(CloudSolrClient
cloudSolrClient, CommandLine cli
String configName =
zkStateReader.getClusterState().getCollection(collectionName).getConfigName();
- boolean deleteConfig = true;
+ boolean deleteConfig = false;
if (cli.hasOption("delete-config")) {
- deleteConfig = "true".equals(cli.getOptionValue("delete-config"));
+ deleteConfig = true;
} else if (cli.hasOption("d")) {
- deleteConfig = "true".equals(cli.getOptionValue("d"));
+ deleteConfig = true;
} else if (cli.hasOption("deleteConfig")) {
- deleteConfig = "true".equals(cli.getOptionValue("deleteConfig"));
+ deleteConfig = true;
Review Comment:
Is it more readable if replaced by the following?
```suggestion
boolean deleteConfig = cli.hasOption("delete-config")
|| cli.hasOption("deleteConfig")
|| cli.hasOption("d");
```
--
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]