On Thu, 10 Jul 2025 11:49:26 GMT, Ravi Gupta <rgu...@openjdk.org> wrote:
>> 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; >> } >> } > > Ravi Gupta has updated the pull request incrementally with one additional > commit since the last revision: > > 8361067: Review comments 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. test/jdk/java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java line 101: > 99: robot.delay(1000); > 100: Point centerFrame = new Point(frame.getLocationOnScreen().x > + frame.getWidth()/2, frame.getLocationOnScreen().y + frame.getHeight()/2); > 101: Point outboundsFrame = new > Point(frame.getLocationOnScreen().x + frame.getWidth()*3/2, > frame.getLocationOnScreen().y + frame.getHeight()/2); should be accessed on EDT. ------------- PR Review: https://git.openjdk.org/jdk/pull/26043#pullrequestreview-3006402971 PR Review Comment: https://git.openjdk.org/jdk/pull/26043#discussion_r2198157732