# HG changeset patch # User serb # Date 1410787783 -14400 # Node ID 91ffd43ffc17b67aaa1b7405221e741c81d62824 # Parent fda83f5c88d10d5923277178d5be3c4b64cf773b 8058136: Test api/java_awt/SplashScreen/index.html\#ClosedSplashScreenTests fails because of java.lang.IllegalStateException was not thrown Reviewed-by: azvegint, anthony diff -r fda83f5c88d1 -r 91ffd43ffc17 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); -}; +}