RFR: 4617681: constructor of BufferedImage throws unexpected IllegalArgumentException
Phil Race
prr at openjdk.org
Sun Oct 12 04:18:06 UTC 2025
On Wed, 8 Oct 2025 00:55:27 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> It is a statement of fact. Not an implNote.
>> If someone used different storage the clause would still be accurate even if there were no actual examples of it left.
>
>>If someone used different storage the clause would still be accurate even if there were no actual examples of it left.
>
> I still would like to clarify, how the next statement could be correct if another storage is in use?
>
>> IllegalArgumentException if the multiplication product of
> * {@code width}, {@code height}, and the number of samples per pixel
> * for the specified format exceeds the maximum length of a Java array.
>
> It is strictly required to throw this exception here and there, even if we will split the data across two arrays.
Do you have a conformant sample implementation that we could consider ?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27640#discussion_r2423327145
More information about the client-libs-dev
mailing list