org.apache.tools.ant.util.optionalClass NoExitSecurityManager
- java.lang.Object
- java.lang.SecurityManager
- org.apache.tools.ant.util.optional.NoExitSecurityManager
public class NoExitSecurityManager extends java.lang.SecurityManager
This is intended as a replacement for the default system manager. The goal is to intercept System.exit calls and make it throw an exception instead so that a System.exit in a task does not fully terminate Ant.
- See Also:
ExitException
Constructor Summary
Constructors Constructor and Description NoExitSecurityManager()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
checkExit(int status)
Override SecurityManager#checkExit.void
checkPermission(java.security.Permission perm)
Override SecurityManager#checkPermission.
Methods inherited from class java.lang.SecurityManager
checkAccept, checkAccess, checkAccess, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader
Method Detail
checkExit
public void checkExit(int status)Override SecurityManager#checkExit. This throws an ExitException(status) exception.
- Overrides:
checkExit
in classjava.lang.SecurityManager
- Parameters:
status
- the exit status
checkPermission
public void checkPermission(java.security.Permission perm)Override SecurityManager#checkPermission. This does nothing.
- Overrides:
checkPermission
in classjava.lang.SecurityManager
- Parameters:
perm
- the requested permission.