changeset 10298:213f54c53e16

8058136: Test api/java_awt/SplashScreen/index.html\#ClosedSplashScreenTests fails because of java.lang.IllegalStateException was not thrown Reviewed-by: azvegint, anthony
author serb
date Mon, 15 Sep 2014 17:29:43 +0400
parents 7c7758fec30c
children ee57428a3ce7
files src/share/classes/java/awt/SplashScreen.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/SplashScreen.java	Fri Nov 28 14:03:56 2014 +0300
+++ b/src/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);
 
-};
+}