]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/icu4j-4_4_2-src/main/shared/data/security.policy
go
[Dictionary.git] / jars / icu4j-4_4_2-src / main / shared / data / security.policy
1 //#\r
2 //#*******************************************************************************\r
3 //#* Copyright (C) 1997-2010, 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\r
10 {\r
11     // temporary for debugging\r
12     // permission java.lang.RuntimePermission "getProtectionDomain";\r
13 \r
14     permission java.lang.RuntimePermission "accessDeclaredMembers";\r
15 \r
16     // needed for Locale.setDefault, only used in tests and demos\r
17     permission java.util.PropertyPermission "user.language", "write";\r
18 \r
19     // for charsets\r
20     permission java.lang.RuntimePermission "charsetProvider", "read";\r
21 \r
22     // IBM 1.6 on Windows does not allow to use reflection to access\r
23     // getDSTSavings in TimeZone implementation class in sun.util.clanedar.\r
24     permission java.lang.RuntimePermission "accessClassInPackage.sun.util.calendar";\r
25 \r
26     // for testing lenient decimal/group separator parsing\r
27     permission java.util.PropertyPermission "com.ibm.icu.text.DecimalFormat.SkipExtendedSeparatorParsing", "write";\r
28 };\r
29 \r
30 // there must be a way for code in one jar file to call code in another jar\r
31 // file and give the called code permission to read the calling code's\r
32 // jar.  they're in different protection domains despite being on the\r
33 // same classpath and being loaded by the same class loader, so the class\r
34 // loader doesn't disambiguate which protection domain we're using. it's\r
35 // not easy to figure out the security docs, sigh.\r
36 //\r
37 // this is so ICUData (in icu4j.jar), called from test code (in core/charset tests jar)\r
38 // can read test resource files (in core/charset tests jar)\r
39 //\r
40 grant codebase "file:${user.dir}/icu4j.jar"\r
41 {\r
42     permission java.io.FilePermission "${/}${user.dir}${/}icu4jtests.jar", "read";\r
43     permission java.io.FilePermission "${/}${user.dir}${/}icu4j-charsets.jar", "read";\r
44 \r
45     permission java.util.PropertyPermission "com.ibm.icu.util.TimeZone.DefaultTimeZoneType", "read";\r
46     permission java.util.PropertyPermission "com.ibm.icu.text.DecimalFormat.SkipExtendedSeparatorParsing", "read";\r
47 };\r
48 \r
49 grant codebase "file:${user.dir}/icu4jtests.jar"\r
50 {\r
51     permission java.io.FilePermission "${/}${user.dir}${/}icu4j.jar", "read";\r
52 };