aboutsummaryrefslogtreecommitdiffstats
path: root/tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java')
-rw-r--r--tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java b/tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java
new file mode 100644
index 0000000..2446f55
--- /dev/null
+++ b/tests/reproducers/simple/CustomPolicies/srcs/CustomPolicies.java
@@ -0,0 +1,23 @@
+import java.applet.Applet;
+import java.security.AccessControlException;
+
+public class CustomPolicies extends Applet {
+
+ @Override
+ public void start() {
+ System.out.println("CustomPolicies applet read: " + read("user.home"));
+ System.exit(0);
+ }
+
+ private String read(String key) {
+ try {
+ return System.getProperty(key);
+ } catch (AccessControlException ace) {
+ return ace.toString();
+ }
+ }
+
+ public static void main(String[] args) {
+ new CustomPolicies().start();
+ }
+}