RFR: 8298823: [macos] java/awt/Mouse/EnterExitEvents/DragWindowTest.java continues to fail with "No MouseReleased event on label!" [v4]

Damon Nguyen dnguyen at openjdk.org
Thu Oct 2 19:18:24 UTC 2025


On Thu, 2 Oct 2025 18:53:02 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Move listener. Add count reset.
>
> test/jdk/java/awt/Mouse/EnterExitEvents/DragWindowTest.java line 59:
> 
>> 57:     private static JLabel label;
>> 58:     private static JButton button;
>> 59:     private static JFrame frame;
> 
> Let's add some air into the declarations of the fields:
> 
> 
>     private static volatile int dragWindowMouseEnteredCount = 0;
>     private static volatile int buttonMouseEnteredCount = 0;
>     private static volatile int labelMouseReleasedCount = 0;
> 
>     private static volatile Point pointToClick;
>     private static volatile Point pointToDrag;
> 
>     private static MyDragWindow dragWindow;
>     private static JLabel label;
>     private static JButton button;
>     private static JFrame frame;
> 
> Is it easier to skim quickly instead a wall of declarations?

Agreed. Updated!

> test/jdk/java/awt/Mouse/EnterExitEvents/DragWindowTest.java line 81:
> 
>> 79:             robot.delay(250);
>> 80: 
>> 81:             if (dragWindowMouseEnteredCount != 1) {
> 
> Would it still work the mouse cursor happened to be located over the label? I think it should… Anyway, nothing's changed here, so it's unimportant.

I think it should too, but I see the test passing locally on my various devices as well as on CI on all OS's, so this seems consistent as is.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27478#discussion_r2399832852
PR Review Comment: https://git.openjdk.org/jdk/pull/27478#discussion_r2399835100


More information about the client-libs-dev mailing list