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