2004-09-26 Casey Marshall <csm@gnu.org>

* java/security/ProtectionDomain.java
       (<init>(CodeSource,PermissionCollection)): set `staticBinding' to
       `true'.

       * java/security/SecureClassLoader.java
       (defineClass): make protection domain dynamically bound.
       (getPermissions): call `getCurrentPolicy' to avoid permission
       check.

From-SVN: r88127
This commit is contained in:
Casey Marshall 2004-09-26 14:47:41 +00:00 committed by Mark Wielaard
parent 68629d160e
commit 59c86e4b88
3 changed files with 14 additions and 3 deletions

View file

@ -84,7 +84,7 @@ public class SecureClassLoader extends ClassLoader
if (cs != null)
{
ProtectionDomain protectionDomain
= new ProtectionDomain(cs, getPermissions(cs));
= new ProtectionDomain(cs, getPermissions(cs), this, null);
return super.defineClass(name, b, off, len, protectionDomain);
}
else
@ -102,7 +102,7 @@ public class SecureClassLoader extends ClassLoader
*/
protected PermissionCollection getPermissions(CodeSource cs)
{
Policy policy = Policy.getPolicy();
Policy policy = Policy.getCurrentPolicy();
return policy.getPermissions(cs);
}
}