提交 be87c2b9 编写于 作者: B bae

6972495: javax/imageio/CachePremissionsTest/CachePermissionsTest.java failed

Reviewed-by: prr
上级 d4d982ba
......@@ -50,9 +50,9 @@
* -Djava.security.debug=access can be used to verify file permissions.
*
* @run main CachePermissionsTest true
* @run main/othervm/policy=w.policy CachePermissionsTest false
* @run main/othervm/policy=rw.policy CachePermissionsTest false
* @run main/othervm/policy=rwd.policy CachePermissionsTest true
* @run main/othervm CachePermissionsTest false w.policy
* @run main/othervm CachePermissionsTest false rw.policy
* @run main/othervm CachePermissionsTest true rwd.policy
*/
import java.io.File;
......@@ -73,6 +73,17 @@ public class CachePermissionsTest {
System.out.println("java.io.tmpdir is " + System.getProperty("java.io.tmpdir"));
if (args.length > 1) {
String testsrc = System.getProperty("test.src", ".");
String policy = testsrc + File.separator + args[1];
System.out.println("Policy file: " + policy);
System.setProperty("java.security.policy", policy);
System.out.println("Install security manager...");
System.setSecurityManager(new SecurityManager());
}
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册