epugh commented on code in PR #3479:
URL: https://github.com/apache/solr/pull/3479#discussion_r2279662809
##########
solr/core/src/java/org/apache/solr/handler/admin/api/CreateCollection.java:
##########
@@ -291,10 +292,10 @@ private static void createSysConfigSet(CoreContainer
coreContainer)
}
public static CreateCollectionRequestBody createRequestBodyFromV1Params(
- SolrParams params, boolean nameRequired) {
+ SolrParams params, boolean nameRequired, Optional<String> propertyName) {
final var requestBody = new CreateCollectionRequestBody();
- requestBody.name =
- nameRequired ? params.required().get(CommonParams.NAME) :
params.get(CommonParams.NAME);
+ final var NAME = propertyName.orElse(CommonParams.NAME);
Review Comment:
`name` is a perfectly fine variable name.
##########
solr/core/src/test/org/apache/solr/handler/admin/api/RestoreCollectionAPITest.java:
##########
@@ -45,10 +45,13 @@
import org.apache.solr.request.LocalSolrQueryRequest;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/** Unit tests for {@link RestoreCollection} */
public class RestoreCollectionAPITest extends SolrTestCaseJ4 {
+ private static final Logger log =
LoggerFactory.getLogger(RestoreCollectionAPITest.class);
Review Comment:
I don't think this is needed?
--
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]