8213261: test javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java fails
authorpsadhukhan
Sat, 03 Nov 2018 09:50:22 +0530
changeset 52539 b0dcecb339c4
parent 52538 6cf31480d3a3
child 52540 a00f1403dbe9
8213261: test javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java fails Reviewed-by: serb
test/jdk/javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java
--- a/test/jdk/javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java	Fri Nov 02 15:38:03 2018 -0700
+++ b/test/jdk/javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java	Sat Nov 03 09:50:22 2018 +0530
@@ -22,7 +22,8 @@
  */
 
 /* @test
-   @bug 8192888
+   @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 {
-            frame.dispose();
+            if (frame != null) {
+                frame.dispose();
+            }
         }
     }
 }