Review request: JDK-8157246 MHs.arrayLength, arrayElementGetter/Setter, arrayConstructor need to specify invocation-time behavior
Paul Sandoz
paul.sandoz at oracle.com
Wed Nov 8 18:20:10 UTC 2017
> On 8 Nov 2017, at 10:13, mandy chung <mandy.chung at oracle.com> wrote:
>
>
>
> On 11/8/17 8:49 AM, Paul Sandoz wrote:
>>> On 7 Nov 2017, at 12:06, mandy chung <mandy.chung at oracle.com> <mailto:mandy.chung at oracle.com> wrote:
>>>
>>> http://cr.openjdk.java.net/~mchung/jdk10/webrevs/8157246/webrev.00/index.html <http://cr.openjdk.java.net/~mchung/jdk10/webrevs/8157246/webrev.00/index.html>
>>>
>>> This fixes the spec of MethodHandles::arrayLength, arrayConstructor, arrayElementGetter/Setter to specify the behavior if the returned method handle is invoked with null array or invalid index; same runtime exception thrown by the bytecode behavior. MethodHandle::asSpreader spec is also clarified to throw NPE and IAE except when it spreads with no argument and the returned method handle accepts a zero-length array or null array.
>>>
>> Looks good, minor comment.
>>
>> MethodHandle
>> --
>>
>> 889 * When the adapter is called, the length of the supplied {@code array}
>> 890 * argument is queried as if by {@code array.length} or {@code arrayLength}
>>
>> s/arrayLength/arraylength/
>>
>> See also MethodHandles.
>>
>
> Oops typo. Fixed.
>
> http://cr.openjdk.java.net/~mchung/jdk10/webrevs/8157246/webrev.01/ <http://cr.openjdk.java.net/~mchung/jdk10/webrevs/8157246/webrev.01/>
>
> Here is the CSR:
> https://bugs.openjdk.java.net/browse/JDK-8190945 <https://bugs.openjdk.java.net/browse/JDK-8190945>
>
> Can you also review it?
>
Reviewed.
Paul.
More information about the core-libs-dev
mailing list