On Thu, 15 Jan 2026 14:19:08 GMT, Christopher Schnick <[email protected]> wrote:

>> It does say that, but I don't believe it to be necessary or effective. First 
>> of all, there should be no concurrent modifications. The rest of this class 
>> assumes this to be true, as `getOrderedChildren()` is iterated over in six 
>> other places in the same class, all without wrapping the getter in a 
>> try-catch block. Second, you've removed the only scenario where the getter 
>> is called with an objectively wrong index (-1), and actually throws an 
>> exception.
>
> At least this way it is minimally invasive. I think removing the catch block 
> would require more review and testing to be approved as that has the 
> potential of changing the behaviour in edge cases with concurrent 
> modifications, even if other methods don't check for it

I agree with @crschnick here: the comment in question, `// minimal protection 
against concurrent update of the list.` is worrisome, and removing the 
try-catch block would turn it into a non-equivalent change that might need 
further review and testing since it might cause regression.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2037#discussion_r2694816022

Reply via email to