882 |
|
* or the security manager's <tt>checkAccess</tt> method denies access. |
883 |
|
*/ |
884 |
|
public void shutdown() { |
885 |
< |
// Fail if caller doesn't have modifyThread permission |
885 |
> |
// Fail if caller doesn't have modifyThread permission. We |
886 |
> |
// explicity chack permissions directly because we can't trust |
887 |
> |
// implementations of SecurityManager to correctly override |
888 |
> |
// the "check access" methods such that our documented |
889 |
> |
// security policy is implemented. |
890 |
|
SecurityManager security = System.getSecurityManager(); |
891 |
|
if (security != null) |
892 |
|
java.security.AccessController.checkPermission(shutdownPerm); |