GrantPSpencer commented on code in PR #2583:
URL: https://github.com/apache/helix/pull/2583#discussion_r1294872371


##########
helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/ClusterAccessor.java:
##########
@@ -321,8 +321,13 @@ public Response updateCluster(@PathParam("clusterId") 
String clusterId,
           customFieldsMap =
               OBJECT_MAPPER.readValue(content, new 
TypeReference<HashMap<String, String>>() {
               });
-          // content is given as a KV mapping. Nullify content
+          // content is given as a KV mapping. Nullify content unless 
(case-insensitive) reason key present in map
           content = null;
+          for (Map.Entry<String, String> entry : customFieldsMap.entrySet()) {

Review Comment:
   As far as I know this is the best solution to find a key case insensitive 
key without making changes to the map data structure, or using something a 
treemap like this:
   TreeMap<>(String.CASE_INSENSITIVE_ORDER);
   
   Fortunately the map should be fairly small from what I've seen, 3-10 
entries, so this inefficiency shouldn't have an impact on overall performance 
of the call



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