RFR(M): 8150635: j.l.i.MethodHandles.loop(...) throws IndexOutOfBoundsException
Paul Sandoz
paul.sandoz at oracle.com
Mon Feb 29 13:46:31 UTC 2016
> On 29 Feb 2016, at 14:39, Michael Haupt <michael.haupt at oracle.com> wrote:
>
>>> * @apiNote Example:
>>> * <blockquote><pre>{@code
>>> * // iterative implementation of the factorial function as a loop handle
>>> * static int one(int k) { return 1; }
>>> * int inc(int i, int acc, int k) { return i + 1; }
>>> ...
>>
>> Do you need to update this example since it is referring to virtual methods? since you need to permute the arguments.
>
> I've updated it to use static methods only, which was the intent, and which is what JavaDocExamplesTest covers. A test for using virtual methods was added anyway.
>
Ok.
>> T8139885.java
>> —
>>
>> Could we rename that test to say “LoopCombinatorTest” ?
>
> With more and more bugs being covered by this test, that clearly makes sense. :-) I like the suggestion to split the test in several ones you made in http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-February/039138.html - I've filed the RFE here: https://bugs.openjdk.java.net/browse/JDK-8150832
>
> A new webrev with the above changes (save the renaming) is at http://cr.openjdk.java.net/~mhaupt/8150635/webrev.01
>
+1
Paul.
More information about the core-libs-dev
mailing list