RFR(S): 8150360: augment/correct MethodHandle API documentation

Paul Sandoz paul.sandoz at oracle.com
Mon Feb 22 20:22:43 UTC 2016


> On 22 Feb 2016, at 12:40, Michael Haupt <michael.haupt at oracle.com> wrote:
> 
> Dear all,
> 
> please review this (doc-only) fix.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8150360
> Webrev: http://cr.openjdk.java.net/~mhaupt/8150360/webrev.00
> 
> The fix addresses one contradiction in the API documentation of MethodHandles.tryFinally(), and adds the following note to the API documentation of the method handle combinators given below:
> 
> +     * <p>
> +     * <em>Note:</em> The resulting adapter is never a {@linkplain MethodHandle#asVarargsCollector
> +     * variable-arity method handle}, even if the original target method handle was.
> 
> * MethodHandle.asCollector(), .bindTo()
> * MethodHandles.collectArguments(), .dropArguments(), .filterArguments(), .filterReturnValue(), .foldArguments(), .permuteArguments()
> 

Looks good. Minor thing, no need for another webrev round.

MethodHandles
—

3849      * The {@code target} and {@code cleanup} handles must have the same corresponding argument and return types, except
3850      * that the {@code cleanup} handle may omit trailing arguments. Also, the {@code cleanup} must have one or two extra
3851      * leading parameters:<ul>

Either “Also, the {@code cleanup} handle must...” or “Also, {@code cleanup} must…” ?

Paul.




More information about the core-libs-dev mailing list