On Tue, 16 Jun 2026 21:24:00 GMT, Phil Race <[email protected]> wrote:

> In JDK 26 the spec for various methods in Raster were updated under 
> https://bugs.openjdk.org/browse/JDK-8369129
> 
> It was discovered that some cases did not actually check an out-of-bounds 
> bank index as specified
> There was a test for two of these cases but there was a bug which caused it 
> to get the expected exception for a different reason.
> 
> The implementation and the test are fixed.
> 
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

src/java.desktop/share/classes/java/awt/image/Raster.java line 821:

> 819:         if (bandOffsets == null) {
> 820:             throw new NullPointerException("bandOffsets is null");
> 821:         }

previously this method relied on the called constructor to check the 3 
parameters above.
But now we use them here so we need to check them first.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31540#discussion_r3424129488

Reply via email to