On Mon, 23 Mar 2026 22:00:10 GMT, Phil Race <[email protected]> wrote:

>> src/java.desktop/share/classes/java/awt/image/DataBuffer.java line 605:
>> 
>>> 603:             ((offset + size) <= 0) ||
>>> 604:             ((offset + size) > arrayLen) ||
>>> 605:             ((offset > 0) && ((offset + size ) < size));
>> 
>> Now that there's `(offset < 0)` in the list, is `(offset > 0) &&` still 
>> needed in the last condition? I'm sure it's redundant now.
>> 
>> Is the entire last condition needed now?
>
> the previous check was for offset  < 0. 
> This one is offset > 0 .. so if it is == 0 we skip but if it is > 0 we want 
> to check for overflow.
> Possibly the 3rd condition is the one that is obsolete but I decided to keep 
> it.

I just missed that file.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29766#discussion_r2977835506

Reply via email to