src/share/classes/java/lang/SecurityManager.java
Print this page
*** 1339,1349 ****
public boolean checkTopLevelWindow(Object window) {
if (window == null) {
throw new NullPointerException("window can't be null");
}
try {
! checkPermission(SecurityConstants.TOPLEVEL_WINDOW_PERMISSION);
return true;
} catch (SecurityException se) {
// just return false
}
return false;
--- 1339,1349 ----
public boolean checkTopLevelWindow(Object window) {
if (window == null) {
throw new NullPointerException("window can't be null");
}
try {
! checkPermission(SecurityConstants.AWT.TOPLEVEL_WINDOW_PERMISSION);
return true;
} catch (SecurityException se) {
// just return false
}
return false;
*** 1389,1399 ****
* @exception SecurityException if the calling thread does not have
* permission to access the system clipboard.
* @see #checkPermission(java.security.Permission) checkPermission
*/
public void checkSystemClipboardAccess() {
! checkPermission(SecurityConstants.ACCESS_CLIPBOARD_PERMISSION);
}
/**
* Throws a <code>SecurityException</code> if the
* calling thread is not allowed to access the AWT event queue.
--- 1389,1399 ----
* @exception SecurityException if the calling thread does not have
* permission to access the system clipboard.
* @see #checkPermission(java.security.Permission) checkPermission
*/
public void checkSystemClipboardAccess() {
! checkPermission(SecurityConstants.AWT.ACCESS_CLIPBOARD_PERMISSION);
}
/**
* Throws a <code>SecurityException</code> if the
* calling thread is not allowed to access the AWT event queue.
*** 1410,1420 ****
* @exception SecurityException if the calling thread does not have
* permission to access the AWT event queue.
* @see #checkPermission(java.security.Permission) checkPermission
*/
public void checkAwtEventQueueAccess() {
! checkPermission(SecurityConstants.CHECK_AWT_EVENTQUEUE_PERMISSION);
}
/*
* We have an initial invalid bit (initially false) for the class
* variables which tell if the cache is valid. If the underlying
--- 1410,1420 ----
* @exception SecurityException if the calling thread does not have
* permission to access the AWT event queue.
* @see #checkPermission(java.security.Permission) checkPermission
*/
public void checkAwtEventQueueAccess() {
! checkPermission(SecurityConstants.AWT.CHECK_AWT_EVENTQUEUE_PERMISSION);
}
/*
* We have an initial invalid bit (initially false) for the class
* variables which tell if the cache is valid. If the underlying