You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ew...@apache.org on 2016/02/09 18:25:34 UTC

kafka git commit: MINOR: Use explicit type in AclCommand

Repository: kafka
Updated Branches:
  refs/heads/trunk 0eaede4dc -> 9cac38c02


MINOR: Use explicit type in AclCommand

Inference sometimes fails for this case.

Author: Ismael Juma <is...@juma.me.uk>

Reviewers: Eno Thereska <en...@gmail.com>, Ewen Cheslack-Postava <ew...@confluent.io>

Closes #885 from ijuma/use-explicit-type-in-acl-command


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/9cac38c0
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/9cac38c0
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/9cac38c0

Branch: refs/heads/trunk
Commit: 9cac38c0216879776b9eab728235e35118e9026e
Parents: 0eaede4
Author: Ismael Juma <is...@juma.me.uk>
Authored: Tue Feb 9 09:25:22 2016 -0800
Committer: Ewen Cheslack-Postava <me...@ewencp.org>
Committed: Tue Feb 9 09:25:22 2016 -0800

----------------------------------------------------------------------
 core/src/main/scala/kafka/admin/AclCommand.scala | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/9cac38c0/core/src/main/scala/kafka/admin/AclCommand.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/admin/AclCommand.scala b/core/src/main/scala/kafka/admin/AclCommand.scala
index bf22e90..3a82e89 100644
--- a/core/src/main/scala/kafka/admin/AclCommand.scala
+++ b/core/src/main/scala/kafka/admin/AclCommand.scala
@@ -113,10 +113,9 @@ object AclCommand {
     withAuthorizer(opts) { authorizer =>
       val resources = getResource(opts, dieIfNoResourceFound = false)
 
-      val resourceToAcls = if (resources.isEmpty)
-        authorizer.getAcls()
-      else
-        resources.map(resource => (resource -> authorizer.getAcls(resource)))
+      val resourceToAcls: Iterable[(Resource, Set[Acl])] =
+        if (resources.isEmpty) authorizer.getAcls()
+        else resources.map(resource => (resource -> authorizer.getAcls(resource)))
 
       for ((resource, acls) <- resourceToAcls)
         println(s"Current ACLs for resource `${resource}`: $Newline ${acls.map("\t" + _).mkString(Newline)} $Newline")