Skip to content

Conversation

@ravigupta30
Copy link
Contributor

@ravigupta30 ravigupta30 commented Jun 30, 2025

Test test/jdk/java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java left debris on system whenever fails its required frame.dispose() in finally block.

 finally {
            EventQueue.invokeAndWait(ExtraButtonDrag::disposeFrame);
        }
    public static void disposeFrame() {
        if (frame != null) {
            frame.dispose();
            frame = null;
        }
    }



Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8361067: Test ExtraButtonDrag.java requires frame.dispose in finally block (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26043/head:pull/26043
$ git checkout pull/26043

Update a local copy of the PR:
$ git checkout pull/26043
$ git pull https://git.openjdk.org/jdk.git pull/26043/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26043

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26043.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 30, 2025

👋 Welcome back rgupta! 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
Copy link

openjdk bot commented Jun 30, 2025

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

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

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

8361067: Test ExtraButtonDrag.java requires frame.dispose in finally block

Reviewed-by: abhiscxk, dnguyen, mvs, prr

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 6042 new commits pushed to 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.

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 (@kumarabhi006, @prrace, @DamonGuy, @manukumarvs) 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 rfr Pull request is ready for review label Jun 30, 2025
@openjdk
Copy link

openjdk bot commented Jun 30, 2025

@ravigupta30 The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Jun 30, 2025
@mlbridge
Copy link

mlbridge bot commented Jun 30, 2025

@ravigupta30
Copy link
Contributor Author

any volunteer for review?

@kumarabhi006
Copy link
Contributor

kumarabhi006 commented Jul 7, 2025

Fix to dispose the frame looks good but the test needs re-factoring like expand wild imports, accessing UI components on EDT, code formatting etc.

I suggest to raise a JBS issue to address these issues.

Copy link
Contributor

@kumarabhi006 kumarabhi006 left a comment

Choose a reason for hiding this comment

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

Copyright year needs to update.
Space formatting is required throughout the code. e.g. L58, L62 etc...
Add @overide for the overridden methods.
SOP statement inside mouseDragged contains commented code... can be removed.
SOP inside mousePressed and mouseReleased can be consistent with other APIs, Pressed instead of >>>.
Commented code can be removed.
Object initialization and setting up the mouse listener can be moved to constructor. I don't think extending Frame is required.

@ravigupta30
Copy link
Contributor Author

@kumarabhi006 i have refactor the test its solved yours suggestions.
Please have a look.

@ravigupta30 ravigupta30 requested a review from kumarabhi006 July 22, 2025 11:13
Copy link
Contributor

@kumarabhi006 kumarabhi006 left a comment

Choose a reason for hiding this comment

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

Looks good to me now. Just a minor correction can be done in summary.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 31, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Aug 5, 2025
Copy link
Contributor

@kumarabhi006 kumarabhi006 left a comment

Choose a reason for hiding this comment

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

LGTM

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 7, 2025
@ravigupta30 ravigupta30 requested a review from prrace August 8, 2025 04:13
@ravigupta30
Copy link
Contributor Author

@prrace requesting you to please re-review the changes

Copy link
Contributor

@DamonGuy DamonGuy left a comment

Choose a reason for hiding this comment

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

Tested on macOS and Ubuntu 24.04 (Wayland & X). Test passes on all except I get a timeout error on Wayland. Can you confirm that this test passes on your end on Wayland?

@ravigupta30
Copy link
Contributor Author

@DamonGuy I have tested it on Ubuntu 20.4 wayland its runs fine.

jpgansible@blrsqe011:~/ravi$ uname -a
Linux blrsqe011.in.oracle.com 6.14.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Sun Apr  6 15:05:05 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
jpgansible@blrsqe011:~/ravi$ loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}'
wayland
jpgansible@blrsqe011:~/ravi$ jdk-26/bin/java -version
java version "26-ea" 2026-03-17
Java(TM) SE Runtime Environment (build 26-ea+9-927)
Java HotSpot(TM) 64-Bit Server VM (build 26-ea+9-927, mixed mode, sharing)
jpgansible@blrsqe011:~/ravi$ jdk-26/bin/java ExtraButtonDrag.java 
areExtraMouseButtonsEnabled() == true
button to drag = 1 : value passed to robot = 1024
button to drag = 2 : value passed to robot = 2048
button to drag = 3 : value passed to robot = 4096
Test Passed
jpgansible@blrsqe011:~/ravi$

Copy link
Contributor

@DamonGuy DamonGuy left a comment

Choose a reason for hiding this comment

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

Re-tested and works fine as explained. Issue was on my end and was resolved.

@ravigupta30
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Aug 25, 2025
@openjdk
Copy link

openjdk bot commented Aug 25, 2025

@ravigupta30
Your change (at version 83a8bc7) is now ready to be sponsored by a Committer.

@manukumarvs
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Aug 26, 2025

Going to push as commit 21efd25.
Since your change was applied there have been 6049 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Aug 26, 2025

@manukumarvs @ravigupta30 Pushed as commit 21efd25.

💡 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

client client-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

6 participants