On Mon, 20 Apr 2026 23:56:03 GMT, Phil Race <[email protected]> wrote:
>> Phil Race has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> 8381007
>
> src/java.desktop/share/classes/java/awt/image/MultiPixelPackedSampleModel.java
> line 349:
>
>> 347: * {@code MultiPixelPackedSampleModel} only has one band, the
>> 348: * bands argument is ignored.
>> 349: * @param bands the specified bands (ignored)
>
> I noticed this very odd spec and implementation.
> * null bands is silently ignored
> * but if you supply it, it must have length one
> * but then it doesn't check the condition that the single referenced band is
> zero.
> * bizarrely it says it will throw IAE for parameters that don't exist
>
> I decided that like getSampleSize(int band) it should say it completely
> ignore the band-related argument. This seems unlikely to affect anyone except
> an app that really wanted a RasterFormatException (!)
> Also the spurious throws clause is removed
> * @return a new {@code SampleModel} with a subset of bands of
> * this {@code MultiPixelPackedSampleModel}.
This tag should be updated as well?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30826#discussion_r3244629779