From: Leif Åstrand Date: Thu, 28 May 2015 07:55:35 +0000 (+0300) Subject: Remove redundant array copy (#18040) X-Git-Tag: 7.5.0.rc1~45 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=177805d898b1f6ed39ab5fb6a0c73ca98103b172;p=vaadin-framework.git Remove redundant array copy (#18040) Change-Id: I86ffcd63441ab55a4fec95b1ba7bd017cabd4c72 --- diff --git a/server/src/com/vaadin/server/ServerRpcManager.java b/server/src/com/vaadin/server/ServerRpcManager.java index 3a2cb3a32c..ae99622a4a 100644 --- a/server/src/com/vaadin/server/ServerRpcManager.java +++ b/server/src/com/vaadin/server/ServerRpcManager.java @@ -153,19 +153,9 @@ public class ServerRpcManager 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 "