RFR: 8339791: Refactor MiscUndecorated/ActiveAWTWindowTest.java
Alexander Zuev
kizune at openjdk.org
Thu Jul 31 16:26:56 UTC 2025
On Fri, 25 Jul 2025 05:33:31 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.
test/jdk/java/awt/Frame/MiscUndecorated/ActiveAWTWindowTest.java line 59:
> 57: private static final CountDownLatch windowActivatedLatch = new CountDownLatch(1);
> 58: private static final CountDownLatch windowDeactivatedLatch = new CountDownLatch(1);
> 59: private static final CountDownLatch windowFocusGainedLatch = new CountDownLatch(1);
I see where we decrement this latch but i do not see where we check it or wait on it. Is it really needed?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26471#discussion_r2245845824
More information about the client-libs-dev
mailing list