On Tue, 5 May 2026 15:27:06 GMT, Alexey Ivanov <[email protected]> wrote:
>> Phil Race has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> 8383605
>
> src/java.desktop/share/classes/java/awt/image/Raster.java line 228:
>
>> 226: if (slsz > Integer.MAX_VALUE) {
>> 227: throw new IllegalArgumentException("width * bands is too
>> large");
>> 228: }
>
> Is it still possible that `w*h*bands > Integer.MAX_VALUE` while neither `w*h`
> nor `w*bands` overflow?
Yes. That's what the 3rd case in the test checks.
The spec change above covers it but the actual validation is done in the called
method
java.lang.IllegalArgumentException: size too large to store image
at
java.desktop/java.awt.image.Raster.createInterleavedRaster(Raster.java:320)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31014#discussion_r3305789637