On Thu, 14 May 2026 22:25:23 GMT, Sergey Bylokhov <[email protected]> wrote:
>> 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?
I've changed "a subset of" -> "the same"
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30826#discussion_r3251099868