On Fri, 1 May 2026 21:08:49 GMT, Phil Race <[email protected]> wrote:
> Better up-front validation of some out of bounds parameters.
>
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK
> Interim AI Policy](https://openjdk.org/legal/ai).
test/jdk/java/awt/image/Raster/InterleavedRasterTest.java line 39:
> 37: int h = 1;
> 38: int b = -1;
> 39: try {
The indentation is inconsistent.
test/jdk/java/awt/image/Raster/InterleavedRasterTest.java line 41:
> 39: try {
> 40: Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE, w, h, b,
> null);
> 41: } catch (IllegalArgumentException e) {
This test does not verify whether an `IllegalArgumentException` is thrown.
I guess it would be better to extract such check into a method that only
returns if IAE is thrown and throws a runtime exception in other cases.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31014#discussion_r3183146566
PR Review Comment: https://git.openjdk.org/jdk/pull/31014#discussion_r3183164516