The second argument of the call to dropArguments in MethodHandles.filterReturnValue should be one and not zero. The goal is to drop the arguments "after" the combined value, not including the combined value. This shows up as a problem when you use a virtual method as a target.
The attachment "TestFilter.java" is a test case to reproduce this issue. The output from running this test is as follows:
10.0
10.0
10.0
java.lang.IllegalArgumentException: target and combiner types must match: (TestFilter,int)double != (TestFilter)int
at sun.dyn.MemberName.newIllegalArgumentException(MemberName.java:511)
at java.dyn.MethodHandles.misMatchedTypes(MethodHandles.java:1845)
at java.dyn.MethodHandles.foldArguments(MethodHandles.java:1784)
at java.dyn.MethodHandles.filterReturnValue(MethodHandles.java:1725)
at TestFilter.main(TestFilter.java:68)