don't do a no-op filter, that was just for testing

This commit is contained in:
Robert Muir 2016-06-06 09:39:39 -04:00
parent 6dbf7ab1ea
commit 881e4058ee
1 changed files with 2 additions and 2 deletions

View File

@ -190,17 +190,17 @@ public final class Def {
static MethodHandle lookupMethod(Class<?> receiverClass, String name, Object args[], long recipe) {
Method method = lookupMethodInternal(receiverClass, name, args.length - 1);
MethodHandle handle = method.handle;
MethodHandle filters[] = new MethodHandle[args.length];
if (recipe != 0) {
MethodHandle filters[] = new MethodHandle[args.length];
for (int i = 0; i < args.length; i++) {
// its a functional reference, replace the argument with an impl
if ((recipe & (1L << (i - 1))) != 0) {
filters[i] = lookupReference(method.arguments.get(i - 1).clazz, (String) args[i]);
}
}
handle = MethodHandles.filterArguments(handle, 0, filters);
}
handle = MethodHandles.filterArguments(handle, 0, filters);
return handle;
}