RFR: 8361067: Test ExtraButtonDrag.java requires frame.dispose in finally block [v2]
Abhishek Kumar
abhiscxk at openjdk.org
Mon Jul 7 06:34:43 UTC 2025
On Tue, 1 Jul 2025 10:12:29 GMT, Ravi Gupta <rgupta at 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: EventQueue.invokeAndWait used
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.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26043#issuecomment-3043636025
More information about the client-libs-dev
mailing list