iamsanjay commented on code in PR #2072:
URL: https://github.com/apache/solr/pull/2072#discussion_r1388290890
##########
solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.java:
##########
@@ -172,12 +175,14 @@ public enum CoreAdminOperation implements CoreAdminOp {
RENAME,
it -> {
SolrParams params = it.req.getParams();
- String name = params.required().get(CoreAdminParams.OTHER);
- String cname = params.required().get(CoreAdminParams.CORE);
-
- if (cname.equals(name)) return;
-
- it.handler.coreContainer.rename(cname, name);
+ final String cname = params.get(CoreAdminParams.CORE);
+ final var renameCoreRequestBody = new RenameCoreRequestBody();
+ renameCoreRequestBody.to = params.get((CoreAdminParams.OTHER));
+ RenameCoreApi renameCoreApi =
+ new RenameCore(
+ it.handler.coreContainer,
it.handler.getCoreAdminAsyncTracker(), it.req, it.rsp);
Review Comment:
Should I use `var` in place for `RenameCoreApi`?
--
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]