On Wed, 14 Jan 2026 21:54:00 GMT, Christopher Schnick <[email protected]> wrote:
>> This is a very basic solution to the OOBE described in the issue. While it
>> would definitely be better to figure out the root cause, understanding the
>> NGNode implementation is above my knowledge level atm.
>>
>> The code has been like that for 10 years and no one complained, so I am not
>> sure whether this is a deeper issue or just a small oversight when handling
>> all possible cases.
>>
>> The fix should retain the exact original workings of the method while
>> avoiding the exception.
>
> Christopher Schnick has updated the pull request incrementally with one
> additional commit since the last revision:
>
> Wrap expression in parentheses
This looks like a localized, safe, and equivalent change.
Please wait until after the fork tomorrow to integrate, even if you get all the
approvals.
modules/javafx.graphics/src/main/java/com/sun/javafx/sg/prism/NGGroup.java line
256:
> 254: if (blendMode == Blend.Mode.SRC_OVER ||
> 255: orderedChildren.size() < 2) { // Blend modes only work
> "between" siblings
> 256: for (int i = startPos == -1 ? 0 : startPos; i <
> orderedChildren.size(); i++) {
very, very minor: Math.max(0, startPos) would work or maybe add parentheses for
clarity:
int i = (startPos < 0 ? 0 : startPos);
upd: I would do startPos < 0 because what if it's -2? :-)
-------------
Marked as reviewed by angorya (Reviewer).
PR Review: https://git.openjdk.org/jfx/pull/2037#pullrequestreview-3662958971
PR Review Comment: https://git.openjdk.org/jfx/pull/2037#discussion_r2692183377