Yunyung commented on code in PR #20091:
URL: https://github.com/apache/kafka/pull/20091#discussion_r2180297671
##########
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:
Just a reminder:
Set.of does not guarantee order, so it could make tests flaky or break
public interfaces.
Please make sure that replacing it with Set.of() won’t cause any issues.
--
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]