Skip to content

Conversation

ktakakuri
Copy link
Member

@ktakakuri ktakakuri commented Mar 15, 2023

This is a backport of JDK-8154043: Fields not reachable anymore by tab-key, because of new tabbing behaviour of radio button groups.

Applying the JDK-8154043 fix as is will result in a regression of JDK-8182577.
The fix of JDK-8182577 adds an interface for JDK10, therefore this fix cannot be backported simply for JDK8u.
So, I propose to judge the buttonModel is an instance of DefaultButtonModel.

Testing:
java/awt
javax/swing
ButtonGroupLayoutTraversalTest.java
bug8033699.java
DefaultButtonModelCrashTest.java
on Windows x86_64


Progress

  • JDK-8154043 needs maintainer approval
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 2 Reviewers)
  • JDK-8182577 needs maintainer approval

Issues

  • JDK-8154043: Fields not reachable anymore by tab-key, because of new tabbing behaviour of radio button groups. (Bug - P3 - Approved)
  • JDK-8182577: Exception when Tab key moves focus to a JCheckbox with a custom ButtonModel (Bug - P3 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/285/head:pull/285
$ git checkout pull/285

Update a local copy of the PR:
$ git checkout pull/285
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/285/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 285

View PR using the GUI difftool:
$ git pr show -t 285

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/285.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 15, 2023

👋 Welcome back ktakakuri! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title Backport 8d81ec63b2bafc431cbb8572a3e45e76580ab46f 8154043: Fields not reachable anymore by tab-key, because of new tabbing behaviour of radio button groups. Mar 15, 2023
@openjdk
Copy link

openjdk bot commented Mar 15, 2023

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport Port of a pull request already in a different code base label Mar 15, 2023
@ktakakuri
Copy link
Member Author

Could someone please review this backport?

@ktakakuri
Copy link
Member Author

@mrserb
I issued this PR in relation to #212.
Could you please review this backport?

@bridgekeeper
Copy link

bridgekeeper bot commented May 10, 2023

@ktakakuri This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@ktakakuri
Copy link
Member Author

Could someone please review this backport?

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 13, 2023
@mlbridge
Copy link

mlbridge bot commented Jun 13, 2023

Webrevs

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 11, 2023

@ktakakuri This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright date updates should be taken from the original commit rather than use the current year. If the existing file has a later copyright date than the file in the original commit, leave the copyright date alone. Other than that, lgtm.

@mrserb
Copy link
Member

mrserb commented Aug 10, 2023

Sorry I did not have a time to look at this PR, will try to look soon.

@ktakakuri
Copy link
Member Author

I corrected the copyright date.

@openjdk
Copy link

openjdk bot commented Sep 7, 2023

@ktakakuri This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8154043: Fields not reachable anymore by tab-key, because of new tabbing behaviour of radio button groups.
8182577: Exception when Tab key moves focus to a JCheckbox with a custom ButtonModel

Reviewed-by: phh, andrew

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 2 new commits pushed to the master branch:

  • 942d6d0: 8212155: Race condition when posting dynamic_code_generated event leads to JVM crash
  • c0a36d8: 8366574: Bump update version of OpenJDK: 8u482

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 7, 2023
@openjdk
Copy link

openjdk bot commented Sep 28, 2023

⚠️ @ktakakuri This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added approval Requires approval; will be removed when approval is received and removed ready Pull request is ready to be integrated labels Sep 28, 2023
@jerboaa
Copy link
Contributor

jerboaa commented Oct 11, 2023

As this fix includes the test from JDK-8182577, please use /isssue add JDK-8182577.

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 8, 2023

@ktakakuri This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@ktakakuri
Copy link
Member Author

I fixed the copyright year and merged the latest master branch. Windows x64 build is failing in configure, and jdk/security_infra test is failing, but this is unrelated to this fix.

@ktakakuri
Copy link
Member Author

I have merged the latest master branch and confirmed that there are no problems after running :jdk_awt and :jdk_swing tests on Windows.

@jerboaa I previously received feedback from another maintainer on this PR. However, there hasn't been any further response for some time, and I'm wondering if there's an opportunity for it to be reviewed. JDK-8154043's bug is impacting several users' applications.
If your schedule permits, would it be possible for you to take a look at this PR?

Thanks.

@gnu-andrew
Copy link
Member

@gnu-andrew This issue is impacting several users' applications. In conjunction with the related backport of 8074883, I would appreciate it if this could be integrated until the October 2025 release. We understand you are busy, but would you be able to review this?

Sorry, I thought this had been abandoned. I'm having a look again now, but have to reacquaint myself with it again.

@gnu-andrew
Copy link
Member

we should also include the correction to the indentation of group.getElements() and presumably the instanceof test?

Thanks for pointing that out. I've corrected the indentations. What does "the instanceof test" mean?

I think I just meant this in the 8182577 11u patch:

-                            if (member.isVisible() && member.isDisplayable() &&
-                                   member.isEnabled() && member.isFocusable()) {
+                            if (member instanceof JToggleButton &&
+                                 member.isVisible() && member.isDisplayable() &&
+                                 member.isEnabled() && member.isFocusable()) {

Of course, it doesn't have the instanceof test in the 8u version, so sorry for the confusion. Anyway, I compared the 11u version of LayoutFocusTraversalPolicy.java with your current patched 8u version and it looks good, so you may have just sorted this one out from the start.

@gnu-andrew
Copy link
Member

In bug8033699.java, line 2, leave the end copyright date at 2019. Other than that, lgtm.

Also, please enable GHA on this repo.

Good catch. 8226892 was already backported with a later copyright date on this file.

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go. Please apply for approval.

@ktakakuri
Copy link
Member Author

@gnu-andrew Thank you for your review. I'm planning to reopen and work on #212 related to this PR soon, so I'd appreciate it if you could review that as well when the time comes.

@ktakakuri
Copy link
Member Author

/approval JDK-8154043 request
Backporting this patch resolves the bug of tabbing behaviour of radio button groups.
Applying the JDK-8154043 fix as is will result in a bug of JDK-8182577. The fix of JDK-8182577 adds an interface for JDK10, therefore this fix cannot be backported simply for jdk8u. So, I proposed to judge the buttonModel is an instance of DefaultButtonModel.
Risk is low. jdk_awt and jdk_swing pass on Windows x86_64.

@ktakakuri
Copy link
Member Author

/approval JDK-8182577 request
Backporting this patch resolves the regression caused by JDK-8154043.
Original patch does not apply cleanly because this patch adds an interface for JDK10. So, I proposed to judge the buttonModel is an instance of DefaultButtonModel.
Risk is low. jdk_awt and jdk_swing pass on Windows x86_64.

@openjdk
Copy link

openjdk bot commented Sep 5, 2025

@ktakakuri
JDK-8154043: Approval has already been requested and rejected.

@openjdk
Copy link

openjdk bot commented Sep 5, 2025

@ktakakuri
JDK-8182577: The approval request has been created successfully.

@openjdk openjdk bot added the approval Requires approval; will be removed when approval is received label Sep 5, 2025
@ktakakuri
Copy link
Member Author

/approval JDK-8154043 cancel

@openjdk
Copy link

openjdk bot commented Sep 5, 2025

@ktakakuri
JDK-8154043: The request has already been handled by a maintainer and can no longer be canceled.

@ktakakuri
Copy link
Member Author

@gnu-andrew JDK-8154043 has already been labeled with jdk8u-fix-no, and I can't submit the request again. I want to resubmit it. How should I proceed?

@openjdk openjdk bot removed the approval Requires approval; will be removed when approval is received label Sep 7, 2025
@gnu-andrew
Copy link
Member

@gnu-andrew JDK-8154043 has already been labeled with jdk8u-fix-no, and I can't submit the request again. I want to resubmit it. How should I proceed?

I've approved manually on the bugs. This should be good to go.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 7, 2025
@ktakakuri
Copy link
Member Author

@gnu-andrew Thank you for your prompt support.

@ktakakuri
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 8, 2025

Going to push as commit 86ecd5b.
Since your change was applied there have been 2 commits pushed to the master branch:

  • 942d6d0: 8212155: Race condition when posting dynamic_code_generated event leads to JVM crash
  • c0a36d8: 8366574: Bump update version of OpenJDK: 8u482

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 8, 2025
@openjdk openjdk bot closed this Sep 8, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 8, 2025
@openjdk
Copy link

openjdk bot commented Sep 8, 2025

@ktakakuri Pushed as commit 86ecd5b.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Port of a pull request already in a different code base integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

6 participants