RFR: 8347392: Thread-unsafe implementation of c.s.j.scene.control.skin.Utils

Andy Goryachev angorya at openjdk.org
Fri Feb 7 16:18:35 UTC 2025


On Thu, 6 Feb 2025 23:39:26 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Thread-safe and re-entrant implementation of Utils.
>> 
>> The new code still uses the static instances of Text and TextLayout for performance reasons, but adds a thread-safe mechanism to keep track of whether any of the instances is in use and when that happens, supplies a new instance instead.  This solves both thread safety and re-entrancy.
>
> tests/system/src/test/java/test/robot/javafx/scene/NodeInitializationStressTest.java line 249:
> 
>> 247: 
>> 248:     @Test
>> 249:     public void checkBox() {
> 
> Minor: this test calls `setSelected(true)`. Would introducing randomness via `setSelected(nextBoolean())` be useful here?

here and elsewhere, you are right

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1691#discussion_r1946792162


More information about the openjfx-dev mailing list