<AWT Dev> [9] Review Request: 8004693 TEST_BUG: java/awt/KeyboardFocusmanager/DefaultPolicyChange/DefaultPolicyChange_Swing.java fails

Alexander Zvegintsev alexander.zvegintsev at oracle.com
Tue Sep 13 19:29:49 UTC 2016

Looks good to me.

On 5/30/16 7:39 PM, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for jdk9.
> The test DefaultPolicyChange_Swing.java has two issues:
>  - It uses invokeLater(), so the test usually pass before the code is 
> executed on the EDT, because the main thread completes before.
>  - The test fetches the FocusTraversalPolicy from the current 
> KeyboardFocusManager. But default FocusTraversalPolicy can be changed 
> during the Swing initialization(JDK-7125044). The test should save the 
> state before setDefaultFocusTraversalPolicy() but after the Swing 
> initialization, and validate that the FocusTraversalPolicy was not 
> changed for windows which were already shown.
> The fix proposed in the CR is applied + small cleanup(regtesthelpers 
> removed and InvokeAndWait is used instead of InvokeLater+realSync)
> Bug: https://bugs.openjdk.java.net/browse/JDK-8004693
> Webrev can be found at: 
> http://cr.openjdk.java.net/~serb/8004693/webrev.01


More information about the awt-dev mailing list