From 074f1a38532e2d78f27eda10499f68e9dd3961ff Mon Sep 17 00:00:00 2001 From: Zsombor Date: Sun, 13 Jul 2008 18:46:27 -0600 Subject: [PATCH] trivial AccessController implementation --- classpath/java/security/AccessController.java | 15 +++++++++++++++ classpath/java/security/PrivilegedAction.java | 7 +++++++ 2 files changed, 22 insertions(+) create mode 100644 classpath/java/security/AccessController.java create mode 100644 classpath/java/security/PrivilegedAction.java diff --git a/classpath/java/security/AccessController.java b/classpath/java/security/AccessController.java new file mode 100644 index 0000000000..3e058771dc --- /dev/null +++ b/classpath/java/security/AccessController.java @@ -0,0 +1,15 @@ +package java.security; + +/** + * No real access control is implemented here. + * + * @author zsombor + * + */ +public class AccessController { + + public static Object doPrivileged (PrivilegedAction action) { + return action.run(); + } + +} diff --git a/classpath/java/security/PrivilegedAction.java b/classpath/java/security/PrivilegedAction.java new file mode 100644 index 0000000000..c76abc542a --- /dev/null +++ b/classpath/java/security/PrivilegedAction.java @@ -0,0 +1,7 @@ +package java.security; + +public interface PrivilegedAction { + + T run(); + +}