kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: MINOR: Use explicit type in AclCommand
Date Tue, 09 Feb 2016 17:25:34 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 0eaede4dc -> 9cac38c02


MINOR: Use explicit type in AclCommand

Inference sometimes fails for this case.

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

Reviewers: Eno Thereska <eno.thereska@gmail.com>, Ewen Cheslack-Postava <ewen@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 <ismael@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")


Mime
View raw message