borisssmidtCET commented on code in PR #14597: URL: https://github.com/apache/kafka/pull/14597#discussion_r1415349250
########## core/src/main/scala/kafka/security/authorizer/AclAuthorizer.scala: ########## @@ -563,15 +570,20 @@ class AclAuthorizer extends Authorizer with Logging { host: String, permissionType: AclPermissionType, acls: AclSeqs): Boolean = { - acls.find { acl => - acl.permissionType == permissionType && - (acl.kafkaPrincipal == principal || acl.kafkaPrincipal == AclEntry.WildcardPrincipal) && - (operation == acl.operation || acl.operation == AclOperation.ALL) && - (acl.host == host || acl.host == AclEntry.WildcardHost) - }.exists { acl => - authorizerLogger.debug(s"operation = $operation on resource = $resource from host = $host is $permissionType based on acl = $acl") - true - } + + acls.exists { acl => Review Comment: i think this change was a code improvement, but also avoided a few allocations. -- 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