stillalex commented on code in PR #1954:
URL: https://github.com/apache/solr/pull/1954#discussion_r1336351310


##########
solr/core/src/java/org/apache/solr/cli/DeleteTool.java:
##########
@@ -102,13 +110,18 @@ public void runImpl(CommandLine cli) throws Exception {
   }
 
   protected void deleteCollection(CommandLine cli) throws Exception {
+    Http2SolrClient.Builder builder =
+        new Http2SolrClient.Builder()
+            .withIdleTimeout(30, TimeUnit.SECONDS)
+            .withConnectionTimeout(15, TimeUnit.SECONDS);
+    if (cli.hasOption("credentials")) {

Review Comment:
   I think I wrote this 'if' a hundred times over. would it be simpler to have 
a `withOptionalBasicAuthCredentials` on the builder that would ignore null 
values instead of throwing some error? it would also allow for cleaner method 
chaining.



-- 
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