RFR(M): 8201593: Print array length in ArrayIndexOutOfBoundsException.
roger.riggs at oracle.com
Wed Apr 18 14:30:25 UTC 2018
The message can be simpler and more efficiently convey the information.
It should be more consistent with existing uses of
throw by: Objects.checkIndex(index, length).
Which roughly reads as:
Index %d out-of-bounds for length %d
On 4/18/18 4:54 AM, David Holmes wrote:
> Adding core-libs-dev as you're changing
> I appreciate the intent here but I find the messages excessively
> verbose. The basic error is:
> index N is outside range [0, length-1]
> On 18/04/2018 6:09 PM, Lindenmaier, Goetz wrote:
>> I would like to print a more verbose text on ArrayIndexOutOfBounds
>> that not only mentions the index, but also the length of the array
>> See the bug for documentation of the change of the message.
>> @aarch/arm people:
>> I edited the aarch/arm files. Could you please verify this is correct?
>> I can not build on these platforms.
>> The code on all the other platforms is tested with all the jtreg and
>> jck tests etc.
>> Best regards,
More information about the core-libs-dev