Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8241999: ChoiceBox: incorrect toggle selected for uncontained #200

Closed
wants to merge 1 commit into from

Conversation

@kleopatra
Copy link
Collaborator

@kleopatra kleopatra commented Apr 28, 2020

The issue is that the toggles is not reliably unselected if an uncontained value is set.

The root is ChoiceBoxSelectionModel which doesn't update the index on selecting an uncontained item, in particular it fails to keep the invariant:

 assertEquals(getItems().indexOf(selectedItem), selectedIndex);

The fix here is to override select(item) to guarantee the assert.

Added/removed ignore from tests that failed before and pass after the fix. All other tests are passing before and after.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8241999: ChoiceBox: incorrect toggle selected for uncontained selectedItem

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jfx pull/200/head:pull/200
$ git checkout pull/200

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Apr 28, 2020

👋 Welcome back fastegal! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request.

@openjdk openjdk bot added the rfr label Apr 28, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Apr 28, 2020

Webrevs

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Apr 28, 2020

@aghaisas can you review this? It looks pretty simple so one reviewer should be enough, unless you spot something where you want a second pair of eyes.

@aghaisas
Copy link
Collaborator

@aghaisas aghaisas commented May 4, 2020

@kevinrushforth, I agree on single reviewer being enough for this change.
The fix looks good to me.

@openjdk
Copy link

@openjdk openjdk bot commented May 4, 2020

@kleopatra This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

8241999: ChoiceBox: incorrect toggle selected for uncontained

Reviewed-by: aghaisas
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /solves command.

Since the source branch of this PR was last updated there have been 7 commits pushed to the master branch:

  • 1cae6a8: 8176499: Dependence on java.util.Timer freezes screen when OS time resets backwards
  • 2b9eb52: 8237504: Update copyright header for files modified in 2020
  • 3130fc8: 8198402: ToggleButton.setToggleGroup causes memory leak when button is removed via ToggleGroup.getToggles()
  • 8ad5805: 8191758: Match WebKit's font weight rendering with JavaFX
  • 66c3b38: 8227425: Add support for e-paper displays on i.MX6 devices
  • e30049f: 8242077: Add information about HTTP/2 and HttpClient usage in WebEngine
  • e0ffca3: 8242505: Some WebKit tests might fail because Microsoft libraries are not loaded

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge master into your branch, and then specify the current head hash when integrating, like this: /integrate 1cae6a87a8322abf96e56853fc8d205723439e42.

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) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label May 4, 2020
@kleopatra
Copy link
Collaborator Author

@kleopatra kleopatra commented May 4, 2020

/integrate

@openjdk openjdk bot added the sponsor label May 4, 2020
@openjdk
Copy link

@openjdk openjdk bot commented May 4, 2020

@kleopatra
Your change (at version b137538) is now ready to be sponsored by a Committer.

@aghaisas
Copy link
Collaborator

@aghaisas aghaisas commented May 5, 2020

/sponsor

@openjdk openjdk bot closed this May 5, 2020
@openjdk openjdk bot added integrated and removed sponsor ready rfr labels May 5, 2020
@openjdk
Copy link

@openjdk openjdk bot commented May 5, 2020

@aghaisas @kleopatra The following commits have been pushed to master since your change was applied:

  • 1cae6a8: 8176499: Dependence on java.util.Timer freezes screen when OS time resets backwards
  • 2b9eb52: 8237504: Update copyright header for files modified in 2020
  • 3130fc8: 8198402: ToggleButton.setToggleGroup causes memory leak when button is removed via ToggleGroup.getToggles()
  • 8ad5805: 8191758: Match WebKit's font weight rendering with JavaFX
  • 66c3b38: 8227425: Add support for e-paper displays on i.MX6 devices
  • e30049f: 8242077: Add information about HTTP/2 and HttpClient usage in WebEngine
  • e0ffca3: 8242505: Some WebKit tests might fail because Microsoft libraries are not loaded

Your commit was automatically rebased without conflicts.

Pushed as commit 99f7747.

@kleopatra kleopatra deleted the kleopatra:bug-fix-JDK-8241999 branch May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants