On Thu, 15 Jan 2026 14:16:12 GMT, Michael Strauß <[email protected]> wrote:
>> Judging from the comment below, the catch block was mainly meant to handle >> concurrent modifications of the list. That scenario might still happen > > 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 ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2037#discussion_r2694576739
