JDK-8217628 : Verbose ArrayIndexOutOfBoundsException message also in JNI calls.
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-01-23
  • Updated: 2021-12-02
  • Resolved: 2019-01-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13
11.0.3Fixed 13 b06Fixed
Related Reports
Relates :  
Relates :  
Description
Change 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 of 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"
Comments
Fix Request I would like to downport this change as it improves the exception messages which is useful for any user of this LTS release. The risk is minimal, as only the messages are changed. Applies cleanly.
04-02-2019

URL: http://hg.openjdk.java.net/jdk/jdk/rev/bce458ffed11 User: goetz Date: 2019-01-29 09:06:49 +0000
29-01-2019