On Thu, 31 Jul 2025 16:24:10 GMT, Alexander Zuev <[email protected]> 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? also no need to use ExtendedRobot as all I can see is mousePress/mouseRelease which can be used from java.awt.Robot class itself.. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26471#discussion_r2247030087
