Yeah, thanks for that.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6416 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2011-01-06 03:25:09 +00:00
parent 0dae31b2c9
commit 5a66c46308
@@ -29,6 +29,8 @@ import java.util.HashMap;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.samskivert.util.ArrayUtil;
import com.threerings.presents.client.Client; import com.threerings.presents.client.Client;
import com.threerings.presents.client.InvocationService; import com.threerings.presents.client.InvocationService;
import com.threerings.presents.server.InvocationProvider; import com.threerings.presents.server.InvocationProvider;
@@ -61,9 +63,8 @@ public class PeerUtil
Method smethod = _pmethods.get(method); Method smethod = _pmethods.get(method);
if (smethod == null) { if (smethod == null) {
Class<?>[] ptypes = method.getParameterTypes(); Class<?>[] ptypes = method.getParameterTypes();
ptypes[0] = Client.class;
_pmethods.put(method, smethod = svc.getClass().getMethod( _pmethods.put(method, smethod = svc.getClass().getMethod(
method.getName(), ptypes)); method.getName(), ArrayUtil.splice(ptypes, 0, 1)));
} }
args[0] = client; args[0] = client;
return smethod.invoke(svc, args); return smethod.invoke(svc, args);