import gnu.classpath.VMStackWalker;
import java.awt.AWTPermission;
-import java.awt.Frame;
-import java.awt.Toolkit;
-import java.awt.Window;
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileInputStream;
public void checkAccess(Thread thread)
{
if (thread.getThreadGroup() != null
- && thread.getThreadGroup().getParent() != null)
+ && thread.getThreadGroup().getParent() == null)
checkPermission(new RuntimePermission("modifyThread"));
}
*/
public void checkAccess(ThreadGroup g)
{
- if (g.getParent() != null)
+ if (g.getParent() == null)
checkPermission(new RuntimePermission("modifyThreadGroup"));
}
* @param window the window to create
* @return true if there is permission to show the window without warning
* @throws NullPointerException if window is null
- * @see Window#Window(Frame)
+ * @see java.awt.Window#Window(java.awt.Frame)
*/
public boolean checkTopLevelWindow(Object window)
{
* an exception.
*
* @throws SecurityException if permission is denied
- * @see Toolkit#getPrintJob(Frame, String, Properties)
+ * @see java.awt.Toolkit#getPrintJob(java.awt.Frame, String, Properties)
* @since 1.1
*/
public void checkPrintJobAccess()
* rather than throwing an exception.
*
* @throws SecurityException if permission is denied
- * @see Toolkit#getSystemClipboard()
+ * @see java.awt.Toolkit#getSystemClipboard()
* @since 1.1
*/
public void checkSystemClipboardAccess()
* rather than throwing an exception.
*
* @throws SecurityException if permission is denied
- * @see Toolkit#getSystemEventQueue()
+ * @see java.awt.Toolkit#getSystemEventQueue()
* @since 1.1
*/
public void checkAwtEventQueueAccess()