You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/04/19 10:38:09 UTC

[GitHub] [kafka] divijvaidya commented on a diff in pull request #12058: MINOR: Scala cleanups in core

divijvaidya commented on code in PR #12058:
URL: https://github.com/apache/kafka/pull/12058#discussion_r852885365


##########
core/src/main/scala/kafka/server/DelegationTokenManager.scala:
##########
@@ -140,13 +140,13 @@ object DelegationTokenManager {
 
     val allow =
     //exclude tokens which are not requested
-      if (!owners.isEmpty && !owners.get.exists(owner => token.ownerOrRenewer(owner))) {
+      if (owners.isDefined && !owners.get.exists(owner => token.ownerOrRenewer(owner))) {

Review Comment:
   although `isDefined` and `nonEmpty` are equivalent but I was wondering if there is a reason for using former at some places and the latter at others?



-- 
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-unsubscribe@kafka.apache.org

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