On Thu, 15 Jan 2026 15:20:27 GMT, Andy Goryachev <[email protected]> wrote:

>> 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.

This PR fixes the performance issue associated with the exceptions. Because 
there will be multiple exceptions thrown in short succession here, this should 
actually be a noticeable improvement. 

After that issue is fixed, you are still left with code of quite bad quality 
with confusing exception handling, yes, but that is in line with the rest of 
the older codebase. It's not like this is an isolated instance, the same method 
has some unnecessary checks further down as well that my IDE correctly flags as 
not needed

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

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

Reply via email to