8242489: ChoiceBox: initially toggle not sync'ed to selection #177
Macroscopic issue is that initially, the toggle is not sync'ed to the selection state. Root reason is an missing else block when updating toggle selection state (see report for details).
Fixed by introducing the else block and removing all follow-up errors that tried to amend the consequences of the incorrect selection state
The former also fixed the memory leak when replacing the selectionModel plus an unreported NPE when the selectionModel is null initially.
Added tests that failed before the fix and passed after. As there had been no tests around toggle state, so added some to verify that the change doesn't break. Enhanced shim/skin to allow access to popup for testing. Removed the informally ignored test part for memory leak.
arapte left a comment
The change looks good to me, however I have minor concern about selecting Separator, which should be taken in a follow on issue. It may need a change in
@kleopatra This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type
Since the source branch of this PR was last updated there have been 19 commits pushed to the
As you do not have Committer status in this project, an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@aghaisas, @arapte) but any other Committer may sponsor as well.
Your commit was automatically rebased without conflicts.
Pushed as commit 69e4266.