[PROPOSAL][JDK10] Introduce Executable.getParameterType(index)

Claes Redestad claes.redestad at oracle.com
Mon Oct 23 11:39:06 UTC 2017


On 2017-10-23 13:30, Christoph Dreis wrote:
>>> I don't think we need the explicit range check here.
>> I thought about that, but decided against the specific
>> ArrayIndexOutOfBoundsException which would be thrown if we omit the
>> explicit check. My reasoning behind that was that the API should not expose
>> the fact that it's working with an array underneath. I have no strong feelings
>> against your comment, though. I'd be fine with both solutions.
> On a second thought, people might expect the ArrayIndexOutOfBoundsException.
>
> And it would behave the same way as getParameterTypes()[index] does currently. So I'd probably in favor of omitting it as you suggested.

Ok.  Specifying the thrown error as IOOBE and not AIOOBE may be fine, 
though.

/Claes



More information about the core-libs-dev mailing list