6990352: SplashScreen.getSplashScreen() does not return null for implicitly closed splash screen

Mark the splash screen closed when it happens implicitly

Reviewed-by: art, dcherepanov
This commit is contained in:
Anthony Petrov 2010-10-12 18:20:07 +04:00
parent bc52d31ebd
commit 214842d862
2 changed files with 9 additions and 0 deletions

View File

@ -318,6 +318,12 @@ public final class SplashScreen {
checkVisible();
_close(splashPtr);
image = null;
SplashScreen.markClosed();
}
}
static void markClosed() {
synchronized (SplashScreen.class) {
wasClosed = true;
theInstance = null;
}

View File

@ -928,7 +928,10 @@ public class Window extends Container implements Accessible {
return;
}
if (beforeFirstWindowShown.getAndSet(false)) {
// We don't use SplashScreen.getSplashScreen() to avoid instantiating
// the object if it hasn't been requested by user code explicitly
SunToolkit.closeSplashScreen();
SplashScreen.markClosed();
}
}