On Wed, 26 Feb 2025 14:34:50 GMT, Kevin Rushforth <k...@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 106: > >> 104: >> 105: // SimpleBooleanProperty or ObjectBinding >> 106: private volatile Object accessibilityActive; > > You can use `ObservableValue<?>` instead of `Object` as the type. > Alternatively, use two fields, a `SimpleBooleanProperty` for use by the FX > app thread and an ObjectBinding for use by a background thread. They wouldn't > need to be volatile in that case. What you have is OK, but using two > properties might simplify the logic a bit. It's a design decision - I won't want to waste an extra pointer. The cpu cycles are much cheaper nowadays than bytes. Extra bytes cost much more in cpu cycles (gc) and electricity. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1697#discussion_r1975850728