Recognize `-Djava.security.manager=allow`
In the latest JDK versions, the string `allow` is not the name of a security
manager, and instead indicates that the code is allowed to install a security
manager of its own.
@@ -86,7 +86,7 @@ class JUnit4Config {
private static boolean installSecurityManager(Properties systemProperties) {
String securityManager = systemProperties.getProperty("java.security.manager");
- if (securityManager != null) {
+ if (securityManager != null && !securityManager.equals("allow")) {
return false; // Don't install over the specified security manager
}
return Boolean.valueOf(
