Package org.codehaus.gmavenplus.util
Class NoExitSecurityManager
java.lang.Object
java.lang.SecurityManager
org.codehaus.gmavenplus.util.NoExitSecurityManager
Custom security manager to
System.exit(int)
(and related) from being used.- Since:
- 1.2
- Author:
- Jason Dillon
-
Constructor Summary
ConstructorDescriptionConstruct a new NoExitSecurityManager, using the System SecurityManager as the parent.NoExitSecurityManager
(SecurityManager newParent) Construct a new NoExitSecurityManager from the parent. -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkExit
(int code) Always throwsSecurityException
.void
checkPermission
(Permission permission) Check the given Permission.Methods inherited from class java.lang.SecurityManager
checkAccept, checkAccess, checkAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkLink, checkListen, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkWrite, checkWrite, getClassContext, getSecurityContext, getThreadGroup
-
Constructor Details
-
NoExitSecurityManager
Construct a new NoExitSecurityManager from the parent.- Parameters:
newParent
- the parent to set
-
NoExitSecurityManager
public NoExitSecurityManager()Construct a new NoExitSecurityManager, using the System SecurityManager as the parent.
-
-
Method Details
-
checkPermission
Check the given Permission.- Overrides:
checkPermission
in classSecurityManager
- Parameters:
permission
- the Permission to check
-
checkExit
public void checkExit(int code) Always throwsSecurityException
.- Overrides:
checkExit
in classSecurityManager
- Parameters:
code
- the exit code that is completely ignored
-