RFR: 8376297: ArrayIndexOutOfBoundsException Not Documented for SinglePixelPackedSampleModel.getSampleSize(int)

Chen Liang liach at openjdk.org
Wed Jan 28 00:20:43 UTC 2026


On Tue, 27 Jan 2026 22:51:27 GMT, Phil Race <prr at openjdk.org> wrote:

> Update the specification of concrete SampleModel classes which over-ride getSampleSize(int band) to describe how the behave.
> It isn't entirely pretty because 2 of them ignore the band parameter and always have ..

I recommend specifying `IndexOutOfBoundsException` instead of AIOOBE: this allows implementation freedom in case an underlying storage is at some point changed to a `List` or some other non-array structure.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/29457#issuecomment-3808236881


More information about the client-libs-dev mailing list