changeset 7402:70b7e2766d4a

8056156: [TEST_BUG] Test javax/swing/JFileChooser/8046391/bug8046391.java fails in Windows Reviewed-by: anthony, alexp
author aivanov
date Thu, 28 Aug 2014 17:14:59 +0400
parents fd940a08ec2d
children 6c199d604eef
files test/javax/swing/JFileChooser/8046391/bug8046391.java
diffstat 1 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/test/javax/swing/JFileChooser/8046391/bug8046391.java	Tue Aug 26 15:55:35 2014 +0400
+++ b/test/javax/swing/JFileChooser/8046391/bug8046391.java	Thu Aug 28 17:14:59 2014 +0400
@@ -47,15 +47,18 @@
             return;
         }
 
-        SwingUtilities.invokeAndWait(() -> {
-            try {
-                UIManager.setLookAndFeel(new WindowsLookAndFeel());
-            } catch (UnsupportedLookAndFeelException e) {
-                e.printStackTrace();
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    UIManager.setLookAndFeel(new WindowsLookAndFeel());
+                } catch (UnsupportedLookAndFeelException e) {
+                    e.printStackTrace();
+                }
+                System.out.println("Creating JFileChooser...");
+                JFileChooser fileChooser = new JFileChooser();
+                System.out.println("Test passed: chooser = " + fileChooser);
             }
-            System.out.println("Creating JFileChooser...");
-            JFileChooser fileChooser = new JFileChooser();
-            System.out.println("Test passed: chooser = " + fileChooser);
         });
         // Test fails if creating JFileChooser hangs
     }