use of com.google.testing.junit.runner.util.GoogleTestSecurityManager in project bazel by bazelbuild.
the class JUnit4Runner method installSecurityManager.
private void installSecurityManager() {
previousSecurityManager = System.getSecurityManager();
GoogleTestSecurityManager newSecurityManager = new GoogleTestSecurityManager();
System.setSecurityManager(newSecurityManager);
// set field after call to setSecurityManager() in case that call fails
googleTestSecurityManager = newSecurityManager;
}
use of com.google.testing.junit.runner.util.GoogleTestSecurityManager in project bazel by bazelbuild.
the class TestRunner method setGoogleTestSecurityManager.
// Sets a new GoogleTestSecurityManager as security manager and returns the previous one.
private static SecurityManager setGoogleTestSecurityManager() {
SecurityManager previousSecurityManager = System.getSecurityManager();
GoogleTestSecurityManager newSecurityManager = new GoogleTestSecurityManager();
System.setSecurityManager(newSecurityManager);
return previousSecurityManager;
}
Aggregations