You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2014/01/06 19:43:23 UTC

git commit: updated refs/heads/rbac to e02e19a

Updated Branches:
  refs/heads/rbac 28b81e423 -> e02e19a6f


Make AclApiServiceTest pass without changing ApiServerService signature.

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

Branch: refs/heads/rbac
Commit: e02e19a6f15808e81d302fb62dd54d6849c5460b
Parents: 28b81e4
Author: Min Chen <mi...@citrix.com>
Authored: Mon Jan 6 10:43:01 2014 -0800
Committer: Min Chen <mi...@citrix.com>
Committed: Mon Jan 6 10:43:01 2014 -0800

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiServerService.java                    | 2 +-
 .../plugin/test/org/apache/cloudstack/acl/AclApiServiceTest.java  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e02e19a6/server/src/com/cloud/api/ApiServerService.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServerService.java b/server/src/com/cloud/api/ApiServerService.java
index 2d6eba5..4a4ae1e 100644
--- a/server/src/com/cloud/api/ApiServerService.java
+++ b/server/src/com/cloud/api/ApiServerService.java
@@ -36,5 +36,5 @@ public interface ApiServerService {
 
     public String handleRequest(Map params, String responseType, StringBuffer auditTrailSb) throws ServerApiException;
 
-    public Class getCmdClass(String cmdName);
+    public Class<?> getCmdClass(String cmdName);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e02e19a6/services/iam/plugin/test/org/apache/cloudstack/acl/AclApiServiceTest.java
----------------------------------------------------------------------
diff --git a/services/iam/plugin/test/org/apache/cloudstack/acl/AclApiServiceTest.java b/services/iam/plugin/test/org/apache/cloudstack/acl/AclApiServiceTest.java
index 9604e01..11515ad 100644
--- a/services/iam/plugin/test/org/apache/cloudstack/acl/AclApiServiceTest.java
+++ b/services/iam/plugin/test/org/apache/cloudstack/acl/AclApiServiceTest.java
@@ -268,7 +268,8 @@ public class AclApiServiceTest {
         policies.add(policy);
         Long policyId = policy.getId();
         Long resId = 200L;
-        when(_apiServer.getCmdClass("listVirtualMachines")).thenReturn(ListVMsCmd.class);
+        Class clz = ListVMsCmd.class;
+        when(_apiServer.getCmdClass("listVirtualMachines")).thenReturn(clz);
         when(
                 _iamSrv.addAclPermissionToAclPolicy(policyId, AclEntityType.VirtualMachine.toString(), PermissionScope.RESOURCE.toString(), resId, "listVirtualMachines",
                         AccessType.ListEntry.toString(), Permission.Allow)).thenReturn(policy);