On 1/17/18 12:16 PM, Paul Sandoz wrote:
On 17 Jan 2018, at 08:50, mandy chung <[email protected]> wrote:
Webrev:
http://cr.openjdk.java.net/~mchung/jdk11/webrevs/8194554/webrev.00/
This fixes a mismatch between the specification and implementation.
If MethodHandles.filterArguments is used to apply two or more non-null
filters to a method handle, those filters will be run in right-to-left
order in the current implementation whereas the javadoc indicates that
these filters are run in normal argument order, left-to-right.
Fix looks good, but perhaps the test logic could be made a little simpler?
Since the filter methods update shared state what if they just add their
identifier to a list so you can observe [“A”, “B”, C”], or [“B”, “C”] etc.
Then you can test against the the list for the required order of filter calls
rather putting logic in the filter methods themselves in what they return (they
can just be identity functions with a side-effect).
That's a good idea (I should have started with a simpler test).
Updated:
http://cr.openjdk.java.net/~mchung/jdk11/webrevs/8194554/webrev.01/
Thanks
Mandy