On Wed, 22 Apr 2026 20:29:47 GMT, Alexey Ivanov <[email protected]> wrote:
> I've got another question. All the `getElem`/`setElem` methods of the
> `DataBuffer` class need the same `@throws ArrayIndexOutOfBoundsException`
> because these methods will throw AIOOBE when used with an invalid index or
> bank.
>
> All the provided implementations of `DataBuffer` override these methods and
> you've added checks to throw a detailed error message, but the superclass
> doesn't specify AIOOBE can be thrown. Nor do any inherited
> `setElem`/`getElem` methods specify AIOOBE, for example `{get,set}ElemFloat`
> and `{get,set}ElemDouble` in `DataBufferByte` and `DataBufferInt`.
I've just now added the throws to all these methods in DataBuffer.java
I don't know for sure what you mean about getElemFloat etc in
DataBufferByte/Int since they aren't over-ridden there.
Perhaps you just meant that they will exhibit the behaviour but there was no
docs on it ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29766#issuecomment-4299855784