RFR(M): 8217628: Verbose ArrayIndexOutOfBoundsException message also in JNI
Lindenmaier, Goetz
goetz.lindenmaier at sap.com
Wed Jan 23 14:37:52 UTC 2019
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...
Please review:
http://cr.openjdk.java.net/~goetz/wr19/8217628-AIOOBE_msg_jni/01/
Best regards,
Goetz.
More information about the hotspot-runtime-dev
mailing list