Window.java (getWarningString): Just return the string.

* java/awt/Window.java (getWarningString): Just return the
	string.
	(Window): Set warningString; check with security manager.

From-SVN: r69699
This commit is contained in:
Tom Tromey 2003-07-23 09:53:34 +00:00 committed by Tom Tromey
parent 78ace45e99
commit 5c798f921a
2 changed files with 11 additions and 17 deletions

View file

@ -159,9 +159,10 @@ public class Window extends Container implements Accessible
// FIXME: add to owner's "owned window" list
//owner.owned.add(this); // this should be a weak reference
/* FIXME: Security check
SecurityManager.checkTopLevelWindow(...)
*/
// FIXME: make this text visible in the window.
SecurityManager s = System.getSecurityManager();
if (s != null && ! s.checkTopLevelWindow(this))
warningString = System.getProperty("awt.appletWarning");
if (gc != null
&& gc.getDevice().getType() != GraphicsDevice.TYPE_RASTER_SCREEN)
@ -315,20 +316,7 @@ public class Window extends Container implements Accessible
*/
public final String getWarningString()
{
boolean secure = true;
/* boolean secure = SecurityManager.checkTopLevelWindow(...) */
if (!secure)
{
if (warningString != null)
return warningString;
else
{
String warning = System.getProperty("awt.appletWarning");
return warning;
}
}
return null;
return warningString;
}
/**