m1a2st commented on code in PR #20091:
URL: https://github.com/apache/kafka/pull/20091#discussion_r2180312771


##########
tools/src/main/java/org/apache/kafka/tools/AclCommand.java:
##########
@@ -249,8 +247,8 @@ private static Map<ResourcePatternFilter, 
Set<AccessControlEntry>> getProducerRe
         Set<ResourcePatternFilter> transactionalIds = 
filters.stream().filter(f -> f.resourceType() == 
ResourceType.TRANSACTIONAL_ID).collect(Collectors.toSet());
         boolean enableIdempotence = opts.options.has(opts.idempotentOpt);
 
-        Set<AccessControlEntry> topicAcls = getAcl(opts, new 
HashSet<>(Arrays.asList(WRITE, DESCRIBE, CREATE)));
-        Set<AccessControlEntry> transactionalIdAcls = getAcl(opts, new 
HashSet<>(Arrays.asList(WRITE, DESCRIBE)));
+        Set<AccessControlEntry> topicAcls = getAcl(opts, new 
HashSet<>(List.of(WRITE, DESCRIBE, CREATE)));
+        Set<AccessControlEntry> transactionalIdAcls = getAcl(opts, new 
HashSet<>(List.of(WRITE, DESCRIBE)));

Review Comment:
   The original code used `new HashSet<>(List.of(...))`, so I believe the order 
was not guaranteed in the previous approach.



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to