You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/11/10 01:58:26 UTC

[GitHub] [solr] madrob opened a new pull request #407: SOLR-15784 Remove SolrJ dep on commons-io

madrob opened a new pull request #407:
URL: https://github.com/apache/solr/pull/407


   https://issues.apache.org/jira/browse/SOLR-15784


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


[GitHub] [solr] janhoy commented on a change in pull request #407: SOLR-15784 Remove SolrJ dep on commons-io

Posted by GitBox <gi...@apache.org>.
janhoy commented on a change in pull request #407:
URL: https://github.com/apache/solr/pull/407#discussion_r746386829



##########
File path: solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
##########
@@ -172,39 +179,46 @@ public static String legacyExampleCollection1SolrHome() {
     if (sourceHome == null)
       throw new IllegalStateException("No source home! Cannot create the legacy example solr home directory.");
 
-    String legacyExampleSolrHome = null;
     try {
-      File tempSolrHome = LuceneTestCase.createTempDir().toFile();
-      org.apache.commons.io.FileUtils.copyFileToDirectory(new File(sourceHome, "server/solr/solr.xml"), tempSolrHome);
-      File collection1Dir = new File(tempSolrHome, "collection1");
-      org.apache.commons.io.FileUtils.forceMkdir(collection1Dir);
+      Path tempSolrHome = LuceneTestCase.createTempDir();
+      Files.copy(Path.of(sourceHome, "server", "solr", "solr.xml"), tempSolrHome.resolve("solr.xml"));
+
+      Path collection1Dir = tempSolrHome.resolve("collection1");
+      Files.createDirectories(collection1Dir.resolve("conf"));
+
+      Path configSetDir = Path.of(sourceHome, "server", "solr", "configsets", "sample_techproducts_configs", "conf");
+
+      Files.walkFileTree(configSetDir, new SimpleFileVisitor<>() {

Review comment:
       Should we move this copy-files code to a Solr Utils class?




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


[GitHub] [solr] dsmiley commented on a change in pull request #407: SOLR-15784 Remove SolrJ dep on commons-io

Posted by GitBox <gi...@apache.org>.
dsmiley commented on a change in pull request #407:
URL: https://github.com/apache/solr/pull/407#discussion_r746243135



##########
File path: solr/solrj/src/java/org/apache/solr/common/EmptyEntityResolver.java
##########
@@ -17,15 +17,15 @@
 package org.apache.solr.common;
 
 import java.io.InputStream;
+
+import org.apache.http.impl.io.EmptyInputStream;

Review comment:
       Maybe okay for now but we may soon be looking to not depend needlessly on Apache HttpClient




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


[GitHub] [solr] madrob merged pull request #407: SOLR-15784 Remove SolrJ dep on commons-io

Posted by GitBox <gi...@apache.org>.
madrob merged pull request #407:
URL: https://github.com/apache/solr/pull/407


   


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


[GitHub] [solr] madrob commented on a change in pull request #407: SOLR-15784 Remove SolrJ dep on commons-io

Posted by GitBox <gi...@apache.org>.
madrob commented on a change in pull request #407:
URL: https://github.com/apache/solr/pull/407#discussion_r746572924



##########
File path: solr/solrj/src/java/org/apache/solr/common/EmptyEntityResolver.java
##########
@@ -17,15 +17,15 @@
 package org.apache.solr.common;
 
 import java.io.InputStream;
+
+import org.apache.http.impl.io.EmptyInputStream;

Review comment:
       I’m happy to kick this can down the road




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


[GitHub] [solr] sonatype-lift[bot] commented on a change in pull request #407: SOLR-15784 Remove SolrJ dep on commons-io

Posted by GitBox <gi...@apache.org>.
sonatype-lift[bot] commented on a change in pull request #407:
URL: https://github.com/apache/solr/pull/407#discussion_r749771293



##########
File path: solr/core/src/java/org/apache/solr/filestore/PackageStoreAPI.java
##########
@@ -337,7 +337,7 @@ private void writeRawFile(SolrQueryRequest req, SolrQueryResponse rsp, String pa
       rsp.add(FILE_STREAM, (SolrCore.RawWriter) os -> {
         packageStore.get(path, (it) -> {
           try {
-            org.apache.commons.io.IOUtils.copy(it.getInputStream(), os);
+            it.getInputStream().transferTo(os);

Review comment:
       *NULL_DEREFERENCE:*  object returned by `it.getInputStream()` could be null and is dereferenced at line 340.
   (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`)




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