On Thu, 14 May 2026 22:03:38 GMT, Sergey Bylokhov <[email protected]> wrote:
>> src/java.desktop/share/classes/java/awt/image/MultiPixelPackedSampleModel.java
>> line 173:
>>
>>> 171: int dataTypeSize = DataBuffer.getDataTypeSize(dataType);
>>> 172: if ((((numberOfBits * (long)w) + dataTypeSize - 1) /
>>> dataTypeSize) > scanlineStride) {
>>> 173: throw new RasterFormatException("scanlineStride is too
>>> small for width");
>>
>> The new spec uses a different code to describe when the
>> RasterFormatException is occurred:
>>>{@code (numberOfBits * w) / DataBuffer.getDataTypeSize(dataType)} is greater
>>>than {@code scanlineStride}
>
> note that this file was formatted mostly 80 chars per row, this change now
> added a few long lines, might be good to split the long lines
I've updated the spec to use the same maths as the code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/30826#discussion_r3251089152