On Tue, 3 Mar 2026 23:07:07 GMT, Phil Race <[email protected]> wrote: >> src/java.desktop/share/classes/java/awt/image/DataBufferByte.java line 297: >> >>> 295: public int getElem(int i) { >>> 296: checkIndex(i); >>> 297: return (int)(data[i+offset]) & 0xff; >> >> It will thrown AIOOBE without explicit `checkIndex`, you want a custom error >> message, right? > > yes
Why don't you want a custom message for `getData(int bank)`? I asked about it [in another comment](https://github.com/openjdk/jdk/pull/29766#discussion_r2880727887). You've added `@throws ArrayIndexOutOfBoundsException` to the javadoc to document this case explicitly. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29766#discussion_r2891423694
