<AWT Dev> RFR: 8253682: The AppletInitialFocusTest1.java is unstable

Sergey Bylokhov serb at openjdk.java.net
Tue Sep 29 10:23:26 UTC 2020

The test assumes that the code below will trigger the focus event on the button2 immediately after setVisible(), but
the window can become visible really fast before button2.requestFocus(); is called, so temporarily the button1 will get
a focus for a small moment.


After the fix, the test will wait for the last focus event, and after that, it checks that the correct button is


Commit messages:
 - Update AppletInitialFocusTest1.java

Changes: https://git.openjdk.java.net/jdk/pull/398/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=398&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8253682
  Stats: 50 lines in 1 file changed: 5 ins; 19 del; 26 mod
  Patch: https://git.openjdk.java.net/jdk/pull/398.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/398/head:pull/398

PR: https://git.openjdk.java.net/jdk/pull/398

More information about the awt-dev mailing list