RFR: 8375561: Class NGGroup is in need of some cleanup [v2]
Andy Goryachev
angorya at openjdk.org
Fri Jan 16 23:12:33 UTC 2026
On Fri, 16 Jan 2026 22:47:54 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/javafx/sg/prism/NGGroup.java line 265:
>>
>>> 263: child = null;
>>> 264: }
>>> 265: // minimal protection against concurrent update of the list.
>>
>> see, this is a worrisome comment - and perhaps the value of this PR would be much higher if you can demonstrate that the concurrency is not an issue.
>
> I think that bar is too high, how would you even begin to demonstrate that it _isn't_ an issue? This class iterates over the very same list in six different places, none of which are "protected" with a try-catch block. I would think that this fact should be enough to say that even if concurrent modification was an issue, it must be solved differently.
assuming for a moment that there is a problem (I don't know), at a minimum one needs to check if multiple threads are accessing the list. the reason is that we might have created a regression:
before - an exception was silently ignored
after - an exception would bubble up and break something else
this is more of an argument against frivolous changes.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2043#discussion_r2700294128
More information about the openjfx-dev
mailing list