ijuma commented on a change in pull request #8769: URL: https://github.com/apache/kafka/pull/8769#discussion_r433245510
########## File path: core/src/main/scala/kafka/security/authorizer/AclAuthorizer.scala ########## @@ -63,9 +64,14 @@ object AclAuthorizer { def exists: Boolean = zkVersion != ZkVersion.UnknownVersion } - class AclSeqs(classes: Seq[AclEntry]*) { - def find(p: AclEntry => Boolean): Option[AclEntry] = classes.flatMap(_.find(p)).headOption - def isEmpty: Boolean = !classes.exists(_.nonEmpty) + class AclSeqs(seqs: Seq[AclEntry]*) { + def find(p: AclEntry => Boolean): Option[AclEntry] = { Review comment: I think this is obvious, no? `find` should generally short-circuit and not go through all the items. That's how it works for all collection implementations I think this kind of comment makes sense in `matchingAcls` where I added one. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org