dsmiley commented on code in PR #1053:
URL: https://github.com/apache/solr/pull/1053#discussion_r1014014058


##########
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:
   We already have code using "var" albeit not much.  Nobody needed permission 
:-). It was explicitly forbidden by us by technical controls (validate source 
patterns gradle) but once 9.0 was released (or soon previously?), this control 
was intentionally lifted so we can use Java 11 stuff.  For some time, we didn't 
want to use Java 11 stuff on main (which became 9) to ease back ports to 8x.  
If hypothetically we wanted to enable Java 17 on main today, we _might_ 
similarly want to avoid constructs that would make back-ports harder.



-- 
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-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to