8144488: Compilation fails on Jake for regtest javax/swing/JMenu/8067346/bug8067346.java
authorssadetsky
Fri, 18 Dec 2015 17:02:42 +0300
changeset 35649 57120e827092
parent 35648 091db1c018f5
child 35650 15f1f0ff7790
8144488: Compilation fails on Jake for regtest javax/swing/JMenu/8067346/bug8067346.java Reviewed-by: alexsch, serb
jdk/test/javax/swing/JMenu/8067346/bug8067346.java
--- a/jdk/test/javax/swing/JMenu/8067346/bug8067346.java	Wed Dec 16 15:29:57 2015 -0800
+++ b/jdk/test/javax/swing/JMenu/8067346/bug8067346.java	Fri Dec 18 17:02:42 2015 +0300
@@ -27,7 +27,6 @@
  @requires (os.family == "windows")
  @run main bug8067346
  */
-import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
 import java.awt.Insets;
 import javax.swing.JFrame;
 import javax.swing.JMenu;
@@ -56,9 +55,17 @@
                 bug8067346 test = new bug8067346();
                 try {
                     // set windows look and feel
-                    UIManager.setLookAndFeel(new WindowsLookAndFeel());
+                    String lnf =
+                           "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
+                    UIManager.setLookAndFeel(lnf);
                 } catch (UnsupportedLookAndFeelException e) {
                     runTest = false;
+                } catch (ClassNotFoundException e) {
+                    runTest = false;
+                } catch (InstantiationException e) {
+                    runTest = false;
+                } catch (IllegalAccessException e) {
+                    runTest = false;
                 }
                 if(runTest) {
                     test.createUI();