Browse Source

Remove redundant array copy (#18040)

Change-Id: I86ffcd63441ab55a4fec95b1ba7bd017cabd4c72
tags/7.5.0.rc1
Leif Åstrand 9 years ago
parent
commit
177805d898
1 changed files with 1 additions and 11 deletions
  1. 1
    11
      server/src/com/vaadin/server/ServerRpcManager.java

+ 1
- 11
server/src/com/vaadin/server/ServerRpcManager.java View 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 "

Loading…
Cancel
Save