You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "renatoh (via GitHub)" <gi...@apache.org> on 2023/08/10 12:25:11 UTC

[GitHub] [solr] renatoh commented on a diff in pull request #1834: Cleaning up old code to prevent warnings

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


##########
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:
   true, 'out' passed in to getFilesPosted is always 0 hence it does not need be posted in. will fix it. thanks



##########
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:
   nope, not needed anymore, will remove the unused imports.



-- 
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-unsubscribe@solr.apache.org

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


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