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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]