RFR: 8349091: Charts: exception initializing in a background thread [v6]

Andy Goryachev angorya at openjdk.org
Mon Mar 3 21:39:02 UTC 2025


On Mon, 3 Mar 2025 21:23:47 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>> Andy Goryachev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 25 commits:
>> 
>>  - Merge remote-tracking branch 'origin/master' into 8349091.charts.thread.safety
>>  - review comments
>>  - Merge remote-tracking branch 'origin/master' into 8349091.charts.thread.safety
>>  - Merge remote-tracking branch 'origin/master' into 8349091.charts.thread.safety
>>  - enabled pie chart test
>>  - Merge branch 'master' into 8349091.charts.thread.safety
>>  - Merge branch 'master' into 8349091.charts.thread.safety
>>  - whitespace
>>  - Merge remote-tracking branch 'origin/master' into 8349091.charts.thread.safety
>>  - cleanup
>>  - ... and 15 more: https://git.openjdk.org/jfx/compare/7a7854c9...4288d1d0
>
> modules/javafx.controls/src/main/java/javafx/scene/chart/Chart.java line 550:
> 
>> 548:                     handleAccessibilityActive(on);
>> 549:                 });
>> 550:                 return active.get();
> 
> I'm confused as to what is happening here.  A boolean property `active` is created, which is bound to `Platform.accessibilityActiveProperty` (this creates a listener on `accessibilityActiveProperty`). We add then another listener on `active`.  
> 
> What confuses me is what this is supposed to achieve, and also why we're initialising the property, but then bind it anyway... `active = new SimpleBooleanProperty(aa)` and later `active.bind` means that the variable `aa` is completely unnecessary as the `bind` will do this `get` for you.

aa is unnecessary, you are right, bind() will set the value.

the property is created as a way to signal any subsequent calls that no more work is needed.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1697#discussion_r1978273865


More information about the openjfx-dev mailing list