RFR (S): 7155168: java/util/TimeZone/Bug6912560.java: expected Asia/Tokyo (original) (raw)

Staffan Larsen staffan.larsen at oracle.com
Tue Nov 27 14:08:17 UTC 2012


Setting -Djava.security.manager on the @run gives me an AccessControlException from jtreg. I could work around this by creating a policy file, I guess.

Exception in thread "main" java.security.AccessControlException: access denied ("java.io.FilePermission" "/Users/staffan/mercurial/jdk8-tl/jdk/JTwork/classes/java/util/TimeZone/Bug6912560.jta" "read") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:364) at java.security.AccessController.checkPermission(AccessController.java:560) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.SecurityManager.checkRead(SecurityManager.java:888) at java.io.FileInputStream.(FileInputStream.java:125) at java.io.FileInputStream.(FileInputStream.java:91) at java.io.FileReader.(FileReader.java:58) at com.sun.javatest.regtest.MainWrapper.main(MainWrapper.java:45)

On 27 nov 2012, at 14:57, Alan Bateman <Alan.Bateman at oracle.com> wrote:

On 27/11/2012 12:26, Staffan Larsen wrote:

: The test installs a security manager and that has to be present during the call to getDefault() when getDefault() does the real work (not just reading from the cache). Setting -Duser.timezone will not help as the only fix. What I mean is change the @run line to this: @run main/othervm -Djava.security.manager -Duser.timezone= Asia/Tokyo ... I have not tried it to know if the "/" will cause a problem on Windows. -Alan.



More information about the core-libs-dev mailing list