diff --git a/test/sun/tools/jstatd/JstatdTest.java b/test/sun/tools/jstatd/JstatdTest.java index 9876a54f093536ed35796f198252715353adba3e..1a11788e09fc97581a8e5ec8a77ae3892bf8ee12 100644 --- a/test/sun/tools/jstatd/JstatdTest.java +++ b/test/sun/tools/jstatd/JstatdTest.java @@ -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");