RFR(M): 8217628: Verbose ArrayIndexOutOfBoundsException message also in JNI

David Holmes david.holmes at oracle.com
Tue Jan 29 09:36:15 UTC 2019


Looks good!

Thanks,
David

On 28/01/2019 8:22 pm, Lindenmaier, Goetz wrote:
> Hi,
> 
> Here a new webrev:
> http://cr.openjdk.java.net/~goetz/wr19/8217628-AIOOBE_msg_jni/03/
> (David, sorry, I missed the list in my mail Friday...)
> 
> Messages are capitalized, the method is refactored (definitely better!).
> 
> Thanks to Martin and Mathias who pointed me to the build error
> of the  lib on solaris ��
> 
> This now passed jdk/submit.
> 
> Best regards,
>    Goetz.
> 
> 
>> -----Original Message-----
>> From: David Holmes <david.holmes at oracle.com>
>> Sent: Donnerstag, 24. Januar 2019 01:40
>> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>; hotspot-runtime-
>> dev at openjdk.java.net
>> Subject: Re: RFR(M): 8217628: Verbose ArrayIndexOutOfBoundsException
>> message also in JNI
>>
>> Hi Goetz,
>>
>> On 24/01/2019 12:37 am, Lindenmaier, Goetz wrote:
>>> Hi
>>>
>>> Change JDK-8201593 <https://bugs.openjdk.java.net/browse/JDK-8201593>
>> : Print array length in ArrayIndexOutOfBoundsException
>>> introduced text as "Index 13 out of bounds for length 10" to various AIOOB
>> exceptions
>>> thrown in the VM. It omitted the exceptions thrown in jni calls.
>>>
>>> This change extends the messages to the AIOOB exceptions thrown in
>>> Get|SetObjectArrayElement and Get|Set<type>ArrayRegion.
>>>
>>> Before, Get|SetObjectArrayElement printed just the index,
>>> Get|Set<type>ArrayRegion printed no message.
>>>
>>> Now the following messages are printed:
>>>     "Index %d out of bounds for length %d"
>>>     "length %d is negative"
>>>     "array region %d..%d out of bounds for length %d"
>>>
>>> Any advice on capitalizing the first word?  It's already
>>> handled inconsistently...
>>
>> I'd suggest capitalizing.
>>
>>> Please review:
>>> http://cr.openjdk.java.net/~goetz/wr19/8217628-AIOOBE_msg_jni/01/
>>
>> Could I ask that you factor the region check into a small function so we
>> don't duplicate the logic please. It would take TRAPS and would be
>> called with a CHECK.
>>
>> Thanks,
>> David
>> -----
>>
>>>
>>>
>>> Best regards,
>>>
>>>     Goetz.
>>>


More information about the hotspot-runtime-dev mailing list