Commit 5c798f92 by Tom Tromey Committed by Tom Tromey

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
parent 78ace45e
2003-07-22 Tom Tromey <tromey@redhat.com>
* java/awt/Window.java (getWarningString): Just return the
string.
(Window): Set warningString; check with security manager.
2003-07-22 Scott Gilbertson <scottg@mantatest.com>
* gnu/awt/xlib/XGraphicsConfiguration.java
......
......@@ -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;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment