public class SystemExitManager
extends java.lang.SecurityManager
checkExit(int)| Constructor and Description |
|---|
SystemExitManager(java.lang.SecurityManager originalSecurityManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkExit(int status)
Always throws a
SystemExitException when System.exit(int) is called, instead of terminating the
JVM. |
void |
checkPermission(java.security.Permission perm) |
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, inClassLoaderpublic SystemExitManager(java.lang.SecurityManager originalSecurityManager)
public void checkExit(int status)
SystemExitException when System.exit(int) is called, instead of terminating the
JVM.
The exception is meant to be handled in the exec:java goal. On the one hand, this avoids that Java
code called in process can terminate the JVM and the whole Maven build process with it. On the other hand, the
exception handler can also differentiate between exit status 0 (OK) and non-0 (error) by inspecting
SystemExitException.getExitCode():
System.exit(int) was called.
checkExit in class java.lang.SecurityManagerstatus - the exit statuspublic void checkPermission(java.security.Permission perm)
checkPermission in class java.lang.SecurityManagerCopyright © 2005–2023 MojoHaus. All rights reserved.