findbugs: toArray of the right type, not Object[]

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

Branch: refs/heads/marvin
Commit: e97e65bff01e5b2f843737293d12ff892ab33f07
Parents: 6b7f91d
Author: Daan Hoogland <[email protected]>
Authored: Sat Apr 5 10:14:54 2014 +0200
Committer: Daan Hoogland <[email protected]>
Committed: Sat Apr 5 10:14:54 2014 +0200

----------------------------------------------------------------------
 server/src/com/cloud/api/dispatch/ParamProcessWorker.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e97e65bf/server/src/com/cloud/api/dispatch/ParamProcessWorker.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/dispatch/ParamProcessWorker.java 
b/server/src/com/cloud/api/dispatch/ParamProcessWorker.java
index c86689f..9db2d38 100644
--- a/server/src/com/cloud/api/dispatch/ParamProcessWorker.java
+++ b/server/src/com/cloud/api/dispatch/ParamProcessWorker.java
@@ -260,7 +260,7 @@ public class ParamProcessWorker implements DispatchWorker {
 
             if (!entitiesToOperate.isEmpty()) {
                 _accountMgr.checkAccess(caller, AccessType.OperateEntry, 
false, apiName,
-                        (ControlledEntity[]) entitiesToOperate.toArray());
+                        entitiesToOperate.toArray(new 
ControlledEntity[entitiesToOperate.size()]));
             }
 
         }

Reply via email to