Esempio n. 1
0
 // Intercept Runtime.getRuntime().halt, and check if the caller is allowed to use it, if not
 // wrap it in a ExitTrappedException
 public static void runtimeHaltCalled(Runtime runtime, int status) {
   ExitVisitor.checkAccess();
   runtime.halt(status);
 }
Esempio n. 2
0
 // Intercept System.exit, and check if the caller is allowed to use it, if not wrap it in a
 // ExitTrappedException
 public static void systemExitCalled(int status) {
   ExitVisitor.checkAccess();
   System.exit(status);
 }