Top Description Constructors Methods
org.apache.tools.ant.util.optional

public Class NoExitSecurityManager

extends SecurityManager
Class Inheritance
Imports
java.security.Permission, org.apache.tools.ant.ExitException

Deprecated

as a consequence of SecurityManager being deprecated. See corresponding docs for further information.

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.

This class is no longer supported in Java runtime versions 18 and higher.

See Also
ExitException

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
checkExit(int
the exit status
status
)

Overrides java.lang.SecurityManager.checkExit.

Override SecurityManager#checkExit.
public void
checkPermission(Permission
the requested permission.
perm
)

Overrides java.lang.SecurityManager.checkPermission.

Override SecurityManager#checkPermission.
Inherited from java.lang.SecurityManager:
checkAcceptcheckAccesscheckAccesscheckConnectcheckConnectcheckCreateClassLoadercheckDeletecheckExeccheckLinkcheckListencheckMulticastcheckMulticastcheckPackageAccesscheckPackageDefinitioncheckPermissioncheckPrintJobAccesscheckPropertiesAccesscheckPropertyAccesscheckReadcheckReadcheckReadcheckSecurityAccesscheckSetFactorycheckWritecheckWritegetClassContextgetSecurityContextgetThreadGroup

Constructor Detail

NoExitSecurityManagerback to summary
public NoExitSecurityManager()

Method Detail

checkExitback to summary
public void checkExit(int status)

Overrides java.lang.SecurityManager.checkExit.

Override SecurityManager#checkExit. This throws an ExitException(status) exception.

Parameters
status:int

the exit status

Annotations
@Override
checkPermissionback to summary
public void checkPermission(Permission perm)

Overrides java.lang.SecurityManager.checkPermission.

Override SecurityManager#checkPermission. This does nothing.

Parameters
perm:Permission

the requested permission.

Annotations
@Override