]> source.dussan.org Git - vaadin-framework.git/commitdiff
Remove redundant array copy (#18040)
authorLeif Åstrand <leif@vaadin.com>
Thu, 28 May 2015 07:55:35 +0000 (10:55 +0300)
committerVaadin Code Review <review@vaadin.com>
Fri, 5 Jun 2015 08:03:42 +0000 (08:03 +0000)
Change-Id: I86ffcd63441ab55a4fec95b1ba7bd017cabd4c72

server/src/com/vaadin/server/ServerRpcManager.java

index 3a2cb3a32c546578969c35f59f02ee97b0ebf3b7..ae99622a4a9400356dcda969d7647d6c9b7c9d55 100644 (file)
@@ -153,19 +153,9 @@ public class ServerRpcManager<T extends ServerRpc> implements Serializable {
     public void applyInvocation(ServerRpcMethodInvocation invocation)
             throws RpcInvocationException {
         Method method = invocation.getMethod();
-        Class<?>[] parameterTypes = method.getParameterTypes();
-        Object[] args = new Object[parameterTypes.length];
         Object[] arguments = invocation.getParameters();
-        for (int i = 0; i < args.length; i++) {
-            // no conversion needed for basic cases
-            // Class<?> type = parameterTypes[i];
-            // if (type.isPrimitive()) {
-            // type = boxedTypes.get(type);
-            // }
-            args[i] = arguments[i];
-        }
         try {
-            method.invoke(implementation, args);
+            method.invoke(implementation, arguments);
         } catch (Exception e) {
             throw new RpcInvocationException("Unable to invoke method "
                     + invocation.getMethodName() + " in "