Hi All,

Please review a test fix which is seen to be failing in mach5 systems with NPE when frame is disposed.

Added null check before dispose to prevent NPE, but then mach5 systems fail with HeadlessException so added key headful to the test.

diff --git a/test/jdk/javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java b/test/jdk/javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java
--- a/test/jdk/javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java
+++ b/test/jdk/javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java
@@ -22,6 +22,7 @@
  */

 /* @test
+   @key headful
+    @bug 8192888 8213261
    @summary Verifies getBaseline causes NPE for Nimbus L&F
    @run main AllSwingComponentsBaselineTest
@@ -58,7 +59,9 @@
             BasicButtonUI bbUI = (BasicButtonUI) UIManager.getUI(b);
             bbUI.getBaseline(b, b.getHeight(), b.getWidth());
         } finally {
+            if (frame != null) {
             frame.dispose();
         }
     }
 }
+}

Regards
Prasanta

Reply via email to