Hi All,

Please review this test fix for jdk12.

Bug: https://bugs.openjdk.java.net/browse/JDK-8198340
webrev: http://cr.openjdk.java.net/~psadhukhan/8198340/webrev.0/

The test fails citing
java.lang.ExceptionInInitializerError
at java.desktop/javax.swing.filechooser.FileSystemView.getDefaultDirectory(FileSystemView.java:449)
...
Caused by: java.lang.IllegalStateException: Shutdown in progress
at java.base/java.lang.ApplicationShutdownHooks.add(ApplicationShutdownHooks.java:66)

This is because test uses invokeLater() to call JFileChooser, which do not wait for runnable to complete and since jtreg will assume completion of main() is end of test, so it will try to stop EDT but it fails to interrupt the EDT. Although the test passes when run in standalone mode, it sometimes creates instability.

Proposed fix is to change invokeLater() to invokeAndWait().

Regards
Prasanta

Reply via email to