diff options
author | Andrew Haley <aph@redhat.com> | 2007-01-29 13:56:21 +0000 |
---|---|---|
committer | Andrew Haley <aph@redhat.com> | 2007-01-29 13:56:21 +0000 |
commit | 1dc519f081c0d51399d830ee96025dff4ca54092 (patch) | |
tree | 3ff245a0c5791faae317fba99374e85f75382488 /java | |
parent | 12aa3aeef2b8f158cda353b7fb57e2b31b25af90 (diff) | |
download | classpath-1dc519f081c0d51399d830ee96025dff4ca54092.tar.gz |
2007-01-29 Andrew Haley <aph@redhat.com>
* java/lang/SecurityManager.java (SecurityManager): Load and
initialize java.security.Security.
Diffstat (limited to 'java')
-rw-r--r-- | java/lang/SecurityManager.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/java/lang/SecurityManager.java b/java/lang/SecurityManager.java index 61b4612b1..ff84d9506 100644 --- a/java/lang/SecurityManager.java +++ b/java/lang/SecurityManager.java @@ -167,6 +167,18 @@ public class SecurityManager */ public SecurityManager() { + /* "When there is security manager installed, the security manager + need to check the package access. However, if the security + manager itself uses any unloaded class, it will trigger the + classloading, which causes infinite loop. There is no easy + legal solution. The workaround will be that security manager + can not depend on any unloaded class. In the constructor of + security manager, it must transitively load all classes it + refers to." Sun bug #4242924. */ + + // Load and initialize java.security.Security + java.security.Security.getProvider((String)null); + SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(new RuntimePermission("createSecurityManager")); |