]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/icu4j-4_2_1-src/src/com/ibm/icu/dev/test/security.policy
icu4jsrc
[Dictionary.git] / jars / icu4j-4_2_1-src / src / com / ibm / icu / dev / test / security.policy
1 //#\r
2 //#*******************************************************************************\r
3 //#* Copyright (C) 1997-2009, International Business Machines Corporation and    *\r
4 //#* others. All Rights Reserved.                                                *\r
5 //#*******************************************************************************\r
6 //#* This is the ant build file for ICU4J.  See readme.html for more information.\r
7 //#*\r
8 // policies needed to run tests\r
9 grant // codebase "file:${user.dir}/icu4jtests.jar"\r
10 {\r
11     // temporary for debugging\r
12     // permission java.lang.RuntimePermission "getProtectionDomain";\r
13 \r
14     // ibm 141 on ibm xp can't use reflection\r
15     permission java.lang.RuntimePermission "accessDeclaredMembers";\r
16 \r
17     // needed for Locale.setDefault, only used in tests and demos\r
18     permission java.util.PropertyPermission "user.language", "write";\r
19 \r
20     // needed for TestUtils\r
21     permission java.util.PropertyPermission "ICUDataPath", "read";\r
22     permission java.util.PropertyPermission "user.dir", "read";\r
23     permission java.util.PropertyPermission "GENERATE_TEST_DATA", "read";\r
24 \r
25     // time zone tests\r
26     permission java.util.PropertyPermission "user.timezone", "read";\r
27 \r
28     //for charsets\r
29     permission java.lang.RuntimePermission "charsetProvider", "read";\r
30 \r
31     // IBM 1.6 on Windows does not allow to use reflection to access\r
32     // getDSTSavings in TimeZone implementation class in sun.util.clanedar.\r
33     permission java.lang.RuntimePermission "accessClassInPackage.sun.util.calendar";\r
34 };\r
35 \r
36 // there must be a way for code in one jar file to call code in another jar\r
37 // file and give the called code permission to read the calling code's\r
38 // jar.  they're in different protection domains despite being on the\r
39 // same classpath and being loaded by the same class loader, so the class\r
40 // loader doesn't disambiguate which protection domain we're using. it's\r
41 // not easy to figure out the security docs, sigh.\r
42 //\r
43 // this is so ICUData (in icu4j.jar), called from test code (in icu4jtests.jar)\r
44 // can read test resource files (in icu4jtests.jar"\r
45 //\r
46 grant codebase "file:${user.dir}/icu4j.jar"\r
47 {\r
48     permission java.io.FilePermission "${/}${user.dir}${/}icu4jtests.jar", "read";\r
49     permission java.io.FilePermission "${/}${user.dir}${/}icu4j-charsets.jar", "read";\r
50 };\r