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
-
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, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkLink, checkListen, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkWrite, checkWrite, getClassContext, getSecurityContext, getThreadGroup
-
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
-