8009881: TEST_BUG: javax/swing/JTree/8004298/bug8004298.java should be modified
authorkshefov
Tue, 19 Mar 2013 17:51:52 +0400
changeset 16467 b73cb5dbcd22
parent 16466 25dc4b603207
child 16468 8675645c0757
8009881: TEST_BUG: javax/swing/JTree/8004298/bug8004298.java should be modified Reviewed-by: serb, alexsch
jdk/test/javax/swing/JTree/8004298/bug8004298.java
--- a/jdk/test/javax/swing/JTree/8004298/bug8004298.java	Mon Mar 18 22:10:11 2013 +0400
+++ b/jdk/test/javax/swing/JTree/8004298/bug8004298.java	Tue Mar 19 17:51:52 2013 +0400
@@ -48,8 +48,13 @@
         Robot robot = new Robot();
         robot.setAutoDelay(50);
         SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
-        UIManager.setLookAndFeel(new WindowsLookAndFeel());
-
+        try {
+            UIManager.setLookAndFeel(new WindowsLookAndFeel());
+        } catch (javax.swing.UnsupportedLookAndFeelException ulafe) {
+            System.out.println(ulafe.getMessage());
+            System.out.println("The test is considered PASSED");
+            return;
+        }
         SwingUtilities.invokeAndWait(new Runnable() {
 
             @Override
@@ -113,4 +118,4 @@
             return super.getPathBounds(tree, path);
         }
     }
-}
\ No newline at end of file
+}