8027752: sun/tools/jstatd/TestJstatdExternalRegistry.java: java.lang.SecurityException: attempt to add a Permission to a readonly Permissions object

Reviewed-by: sla, jbachorik
This commit is contained in:
Katja Kantserova 2013-11-07 16:55:39 +01:00
parent f0a88e10f3
commit d876d630e3

View File

@ -291,6 +291,8 @@ public final class JstatdTest {
launcher.addVMArg("-XX:+UsePerfData");
String testSrc = System.getProperty("test.src");
File policy = new File(testSrc, "all.policy");
assertTrue(policy.exists() && policy.isFile(),
"Security policy " + policy.getAbsolutePath() + " does not exist or not a file");
launcher.addVMArg("-Djava.security.policy=" + policy.getAbsolutePath());
if (port != null) {
launcher.addToolArg("-p");