Package org.apache.hadoop.hbase.util
Class LauncherSecurityManager
java.lang.Object
java.lang.SecurityManager
org.apache.hadoop.hbase.util.LauncherSecurityManager
class for masquerading System.exit(int). Use for test main method with System.exit(int ) usage:
new LauncherSecurityManager(); try { CellCounter.main(args); fail("should be exception"); } catch
(SecurityException e) { assert(.,e.getExitCode()); }
-
Field Summary
Fields inherited from class java.lang.SecurityManager
inCheck
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkExit
(int status) void
checkPermission
(Permission perm) void
checkPermission
(Permission perm, Object context) int
void
reset()
Methods inherited from class java.lang.SecurityManager
checkAccept, checkAccess, checkAccess, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader
-
Field Details
-
exitCode
-
securityManager
-
-
Constructor Details
-
LauncherSecurityManager
public LauncherSecurityManager()
-
-
Method Details
-
checkPermission
- Overrides:
checkPermission
in classSecurityManager
-
checkPermission
- Overrides:
checkPermission
in classSecurityManager
-
checkExit
- Overrides:
checkExit
in classSecurityManager
- Throws:
SecurityException
-
getExitCode
-
reset
-