summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2005-07-14 17:22:18 +0000
committerTom Tromey <tromey@gcc.gnu.org>2005-07-14 17:22:18 +0000
commit9d5faaafe31ec7a7b78c9d4d3434efef5846bf83 (patch)
tree85e0bea94995e605152a4b5efe085f9ae37d9ab6 /libjava
parentd71b89ca60e6546aaef903c22c6459b592f934d4 (diff)
downloadgcc-9d5faaafe31ec7a7b78c9d4d3434efef5846bf83.tar.gz
Class.java (getProtectionDomain): Merged javadoc from Classpath.
* java/lang/Class.java (getProtectionDomain): Merged javadoc from Classpath. From-SVN: r102025
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/java/lang/Class.java13
2 files changed, 18 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index bb47d00b826..66a440ce732 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-14 Tom Tromey <tromey@redhat.com>
+
+ * java/lang/Class.java (getProtectionDomain): Merged javadoc from
+ Classpath.
+
2005-07-12 Aaron Luchko <aluchko@redhat.com>
* gnu/classpath/jdwp/processor/FieldCommandSet.java:
diff --git a/libjava/java/lang/Class.java b/libjava/java/lang/Class.java
index 1cee6d17262..da84bfd7f4c 100644
--- a/libjava/java/lang/Class.java
+++ b/libjava/java/lang/Class.java
@@ -769,6 +769,19 @@ public final class Class implements Serializable
// can't add fields to java.lang.Class that are accessible from Java.
private native ProtectionDomain getProtectionDomain0();
+ /**
+ * Returns the protection domain of this class. If the classloader did not
+ * record the protection domain when creating this class the unknown
+ * protection domain is returned which has a <code>null</code> code source
+ * and all permissions. A security check may be performed, with
+ * <code>RuntimePermission("getProtectionDomain")</code>.
+ *
+ * @return the protection domain
+ * @throws SecurityException if the security manager exists and the caller
+ * does not have <code>RuntimePermission("getProtectionDomain")</code>.
+ * @see RuntimePermission
+ * @since 1.2
+ */
public ProtectionDomain getProtectionDomain()
{
SecurityManager sm = System.getSecurityManager();