8027752: sun/tools/jstatd/TestJstatdExternalRegistry.java: java.lang.SecurityException: attempt to add a Permission to a readonly Permissions object
authorykantser
Thu, 07 Nov 2013 16:55:39 +0100
changeset 21627 5e31d6573ec2
parent 21626 6124fbba6436
child 21628 50fd58446d64
8027752: sun/tools/jstatd/TestJstatdExternalRegistry.java: java.lang.SecurityException: attempt to add a Permission to a readonly Permissions object Reviewed-by: sla, jbachorik
jdk/test/sun/tools/jstatd/JstatdTest.java
--- a/jdk/test/sun/tools/jstatd/JstatdTest.java	Fri Nov 08 08:47:39 2013 +0100
+++ b/jdk/test/sun/tools/jstatd/JstatdTest.java	Thu Nov 07 16:55:39 2013 +0100
@@ -291,6 +291,8 @@
         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");