On Tue, 28 Apr 2026 23:33:39 GMT, Phil Race <[email protected]> wrote:
>> or maybe we have so many changes that the meaning of "size" is changed now
>
> I don't think we've changed the meaning of size.
> Before this PR was begun we had
>
> /**
> * Constructs a byte-based {@code DataBuffer} with a single bank using the
> * specified array, size, and offset. {@code dataArray} must have at
> least
> * {@code offset} + {@code size} elements.
> ...
> */
> public DataBufferByte(byte[] dataArray, int size, int offset){
>
> and
> public int getElem(int i) {
> return (int)(data[i+offset]) & 0xff;
> }
>
> The constructor docs still say the same now and the getElem() call still uses
> [i+offset]
Then the code(and test), and the error message should be updated to follow the
spec "0 <= index < size"
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29766#discussion_r3163181577