Package org.codehaus.gmavenplus.util
Class NoExitSecurityManager
- java.lang.Object
-
- java.lang.SecurityManager
-
- org.codehaus.gmavenplus.util.NoExitSecurityManager
-
public class NoExitSecurityManager extends SecurityManager
Custom security manager toSystem.exit(int)
(and related) from being used.- Since:
- 1.2
- Author:
- Jason Dillon
-
-
Field Summary
-
Fields inherited from class java.lang.SecurityManager
inCheck
-
-
Constructor Summary
Constructors Constructor Description NoExitSecurityManager()
Construct a new NoExitSecurityManager, using the System SecurityManager as the parent.NoExitSecurityManager(SecurityManager newParent)
Construct a new NoExitSecurityManager from the parent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkExit(int code)
Always throwsSecurityException
.void
checkPermission(Permission permission)
Check the given Permission.-
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
-
-
-
-
Constructor Detail
-
NoExitSecurityManager
public NoExitSecurityManager(SecurityManager newParent)
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 Detail
-
checkPermission
public void checkPermission(Permission permission)
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
-
-