Java Code Examples for java.security.Permissions#setReadOnly()

The following examples show how to use java.security.Permissions#setReadOnly() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CustomClassLoader.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
protected PermissionCollection getPermissions(CodeSource codeSource) {
    Permissions perms = new Permissions();
    perms.add(new AllPermission());
    perms.setReadOnly();
    return perms;
}
 
Example 2
Source File: ModuleManager.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public SystemClassLoader(List<File> files, ClassLoader[] parents, Set<Module> modules) throws IllegalArgumentException {
    super(files, parents, false);
    allPermissions = new Permissions();
    allPermissions.add(new AllPermission());
    allPermissions.setReadOnly();
    size = modules.size();
}
 
Example 3
Source File: DbURLClassLoader.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected PermissionCollection getPermissions(CodeSource codesource) {
    Permissions permissions = new Permissions();
    permissions.add(new AllPermission());
    permissions.setReadOnly();
    
    return permissions;
}
 
Example 4
Source File: DriverClassLoader.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected PermissionCollection getPermissions(CodeSource codesource) {
    Permissions permissions = new Permissions();
    permissions.add(new AllPermission());
    permissions.setReadOnly();
    
    return permissions;
}
 
Example 5
Source File: DbURLClassLoader.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected PermissionCollection getPermissions(CodeSource codesource) {
    Permissions permissions = new Permissions();
    permissions.add(new AllPermission());
    permissions.setReadOnly();
    
    return permissions;
}
 
Example 6
Source File: DriverClassLoader.java    From netbeans with Apache License 2.0 5 votes vote down vote up
protected PermissionCollection getPermissions(CodeSource codesource) {
    Permissions permissions = new Permissions();
    permissions.add(new AllPermission());
    permissions.setReadOnly();
    
    return permissions;
}
 
Example 7
Source File: AppEngineWebXml.java    From appengine-java-vm-runtime with Apache License 2.0 5 votes vote down vote up
public Permissions getUserPermissions() {
  Permissions permissions = new Permissions();
  for (UserPermission permission : userPermissions) {
    permissions.add(
        new UnresolvedPermission(
            permission.getClassName(), permission.getName(), permission.getActions(), null));
  }
  permissions.setReadOnly();
  return permissions;
}