epugh commented on code in PR #1053:
URL: https://github.com/apache/solr/pull/1053#discussion_r1010962959
##########
solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java:
##########
@@ -1298,19 +1298,25 @@ public Map<String, Object> execute(
V2ApiUtils.squashIntoSolrResponseWithoutHeader(rsp,
addReplicaPropResponse);
return null;
}),
- // XXX should this command support followAliases?
DELETEREPLICAPROP_OP(
DELETEREPLICAPROP,
(req, rsp, h) -> {
- Map<String, Object> map =
- copy(
- req.getParams().required(),
- null,
- COLLECTION_PROP,
- PROPERTY_PROP,
- SHARD_ID_PROP,
- REPLICA_PROP);
- return copy(req.getParams(), map, PROPERTY_PROP);
+ final RequiredSolrParams requiredParams = req.getParams().required();
+ final String propNameToDelete = requiredParams.get(PROPERTY_PROP);
+ final String trimmedPropNameToDelete =
+ propNameToDelete.startsWith(PROPERTY_PREFIX)
+ ? propNameToDelete.substring(PROPERTY_PREFIX.length())
+ : propNameToDelete;
+ final DeleteReplicaPropertyAPI deleteReplicaPropertyAPI =
Review Comment:
I don't think I'm the person to introduce new Java constructs to the Solr
code base ;-) I think if the community is up for it, great... I might
advocate that we do a big sweep through so that all the places `var` makes
sense, we put that in, so it's not "a bit one way here, a bit the other way
there" And maybe we even have a way of checking that!
--
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]