8058136: Test api/java_awt/SplashScreen/index.html\#ClosedSplashScreenTests fails because of java.lang.IllegalStateException was not thrown
authorserb
Mon, 15 Sep 2014 17:29:43 +0400
changeset 26745 91ffd43ffc17
parent 26744 fda83f5c88d1
child 26746 67d075b319c1
8058136: Test api/java_awt/SplashScreen/index.html\#ClosedSplashScreenTests fails because of java.lang.IllegalStateException was not thrown Reviewed-by: azvegint, anthony
jdk/src/java.desktop/share/classes/java/awt/SplashScreen.java
--- a/jdk/src/java.desktop/share/classes/java/awt/SplashScreen.java	Mon Sep 15 17:27:15 2014 +0400
+++ b/jdk/src/java.desktop/share/classes/java/awt/SplashScreen.java	Mon Sep 15 17:29:43 2014 +0400
@@ -293,6 +293,7 @@
      */
     public Graphics2D createGraphics() throws IllegalStateException {
         synchronized (SplashScreen.class) {
+            checkVisible();
             if (image==null) {
                 // get unscaled splash image size
                 Dimension dim = _getBounds(splashPtr).getSize();
@@ -419,4 +420,4 @@
     private native static boolean _setImageData(long SplashPtr, byte[] data);
     private native static float _getScaleFactor(long SplashPtr);
 
-};
+}