RFR: 8339791: Refactor MiscUndecorated/ActiveAWTWindowTest.java [v5]

Prasanta Sadhukhan psadhukhan at openjdk.org
Thu Sep 11 05:23:54 UTC 2025


On Mon, 8 Sep 2025 08:42:35 GMT, Srinivas Mandalika <smandalika at openjdk.org> wrote:

>> The java/awt/Frame/MiscUndecorated/ActiveAWTWindowTest.java test uses object monitors and wait/notify to synchronise actions in the test.
>> 
>> Using CountDownLatch could make the test simpler, shorter, clearer.
>> Tested the code on a windows-x64, macos-x64 and lnux-x64 machines and the test is working as expected.
>
> Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review Feedback: simplified test failure conditions.

test/jdk/java/awt/Frame/MiscUndecorated/ActiveAWTWindowTest.java line 28:

> 26:  * @key headful
> 27:  * @summary To check proper WINDOW_EVENTS are triggered when Frame gains
> 28:  * or looses the focus

align the summary..should be "loses"

test/jdk/java/awt/Frame/MiscUndecorated/ActiveAWTWindowTest.java line 220:

> 218:                     "undecorated frame when another frame gains focus!");
> 219:         }
> 220:         if (frame.hasFocus()) {

why this check is removed? We dont have latch for windowLostFocus so I think this check would be required!!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26471#discussion_r2338614564
PR Review Comment: https://git.openjdk.org/jdk/pull/26471#discussion_r2338617407


More information about the client-libs-dev mailing list