From 177805d898b1f6ed39ab5fb6a0c73ca98103b172 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Thu, 28 May 2015 10:55:35 +0300 Subject: [PATCH] Remove redundant array copy (#18040) Change-Id: I86ffcd63441ab55a4fec95b1ba7bd017cabd4c72 --- server/src/com/vaadin/server/ServerRpcManager.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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 " -- 2.39.5