Initializes the list of granted permissions, checks the list of revoked permissions.
granted = new java.security.Permissions();
for (Iterator i = revokedPermissions.listIterator(); i.hasNext();) {
Permissions.Permission p = (Permissions.Permission) i.next();
if (p.getClassName() == null) {
throw new BuildException("Revoked permission " + p + " does not contain a class.");
}
}
for (Iterator i = grantedPermissions.listIterator(); i.hasNext();) {
Permissions.Permission p = (Permissions.Permission) i.next();
if (p.getClassName() == null) {
throw new BuildException("Granted permission " + p + " does not contain a class.");
} else {
java.security.Permission perm =
new UnresolvedPermission(p.getClassName(), p.getName(), p.getActions(), null);
granted.add(perm);
}
}
// Add base set of permissions
granted.add(new java.net.SocketPermission("localhost:1024-", "listen"));
granted.add(new java.util.PropertyPermission("java.version", "read"));
granted.add(new java.util.PropertyPermission("java.vendor", "read"));
granted.add(new java.util.PropertyPermission("java.vendor.url", "read"));
granted.add(new java.util.PropertyPermission("java.class.version", "read"));
granted.add(new java.util.PropertyPermission("os.name", "read"));
granted.add(new java.util.PropertyPermission("os.version", "read"));
granted.add(new java.util.PropertyPermission("os.arch", "read"));
granted.add(new java.util.PropertyPermission("file.encoding", "read"));
granted.add(new java.util.PropertyPermission("file.separator", "read"));
granted.add(new java.util.PropertyPermission("path.separator", "read"));
granted.add(new java.util.PropertyPermission("line.separator", "read"));
granted.add(new java.util.PropertyPermission("java.specification.version", "read"));
granted.add(new java.util.PropertyPermission("java.specification.vendor", "read"));
granted.add(new java.util.PropertyPermission("java.specification.name", "read"));
granted.add(new java.util.PropertyPermission("java.vm.specification.version", "read"));
granted.add(new java.util.PropertyPermission("java.vm.specification.vendor", "read"));
granted.add(new java.util.PropertyPermission("java.vm.specification.name", "read"));
granted.add(new java.util.PropertyPermission("java.vm.version", "read"));
granted.add(new java.util.PropertyPermission("java.vm.vendor", "read"));
granted.add(new java.util.PropertyPermission("java.vm.name", "read"));