risdenk commented on code in PR #1491:
URL: https://github.com/apache/solr/pull/1491#discussion_r1148410861


##########
solr/core/src/test/org/apache/solr/schema/ChangedSchemaMergeTest.java:
##########
@@ -83,15 +84,15 @@ private void addDoc(SolrCore core, String... fieldValues) 
throws IOException {
   }
 
   private CoreContainer init() throws Exception {
-    File changed = new File(solrHomeDirectory, "changed");
-    copyMinConf(changed, "name=changed");
+    Path changed = solrHomeDirectory.toPath().resolve("changed");
+    copyMinConf(changed.toFile(), "name=changed");
     // Overlay with my local schema
-    schemaFile = new File(new File(changed, "conf"), "schema.xml");
-    FileUtils.writeStringToFile(schemaFile, withWhich, StandardCharsets.UTF_8);
+    schemaFile = changed.resolve("conf").resolve("schema.xml").toFile();
+    Files.writeString(schemaFile.toPath(), withWhich, StandardCharsets.UTF_8);

Review Comment:
   gah good call. I figured schemaFile and solrHomeDirectory were part of the 
test framework and not private variables.



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

Reply via email to