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 Sure, but we're here now, why come back to it later? As you point out, the code has been like that for 10 years, so there's no need for a "quick" fix. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2037#discussion_r2694799800
