--- a/jdk/test/tools/jlink/SecurityTest.java Thu Mar 24 11:20:14 2016 -0700
+++ b/jdk/test/tools/jlink/SecurityTest.java Thu Mar 24 13:09:48 2016 -0700
@@ -25,7 +25,7 @@
* @test
* @summary Test JlinkPermission
* @author Jean-Francois Denise
- * @run main SecurityTest
+ * @run main/othervm SecurityTest
*/
import java.security.AccessControlException;
@@ -36,16 +36,11 @@
public static void main(String[] args) throws Exception {
new Jlink();
System.setSecurityManager(new SecurityManager());
- boolean failed = false;
try {
new Jlink();
- failed = true;
+ throw new Exception("Call should have failed");
} catch (AccessControlException ex) {
- //XXX OK.
+ // expected exception
}
- if (failed) {
- throw new Exception("Call should have failed");
- }
-
}
}