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