changeset 53507:b0dcecb339c4

8213261: test javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java fails Reviewed-by: serb
author psadhukhan
date Sat, 03 Nov 2018 09:50:22 +0530
parents 6cf31480d3a3
children a00f1403dbe9
files test/jdk/javax/swing/plaf/nimbus/AllSwingComponentsBaselineTest.java
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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();
+            }
         }
     }
 }