epugh commented on code in PR #1834:
URL: https://github.com/apache/solr/pull/1834#discussion_r1290029229


##########
solr/core/src/java/org/apache/solr/cli/AssertTool.java:
##########
@@ -30,6 +30,7 @@
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.request.HealthCheckRequest;
+import org.apache.solr.client.solrj.response.CollectionAdminResponse;

Review Comment:
   is this import needed?



##########
solr/core/src/java/org/apache/solr/cli/SimplePostTool.java:
##########
@@ -544,14 +537,20 @@ public int postFiles(File[] files, int startIndexInArgs, 
OutputStream out, Strin
     reset();
     int filesPosted = 0;
     for (File srcFile : files) {
-      boolean isValidPath = checkIsValidPath(srcFile);
-      if (isValidPath && srcFile.isDirectory() && srcFile.canRead()) {
-        filesPosted += postDirectory(srcFile, out, type);
-      } else if (isValidPath && srcFile.isFile() && srcFile.canRead()) {
-        filesPosted += postFiles(new File[] {srcFile}, out, type);
-      } else {
-        filesPosted += handleGlob(srcFile, out, type);
-      }
+      filesPosted = getFilesPosted(out, type, filesPosted, srcFile);

Review Comment:
   this nesting seems a bit odd...   I would expect this entire method to 
return all the files posted from the source `files` and not pass in and out the 
counter....



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