Package java.security

Examples of java.security.UnresolvedPermission


            Constructor ctr = clazz.getConstructor(PARAMS);
            return (java.security.Permission) ctr.newInstance(new Object[] {
                    name, actions });
        } catch (Exception e) {
            // Let the UnresolvedPermission handle it.
            return new UnresolvedPermission(permission.getClassName(),
                    permission.getName(), permission.getActions(), null);
        }
    }
View Full Code Here


                        pe.actions);
            }
        }
        catch (ClassNotFoundException cnfe) {}
        //maybe properly signed class will be loaded later
        return new UnresolvedPermission(pe.klass, pe.name, pe.actions, signers);
    }
View Full Code Here

         * jre/lib/ext Extension ClassLoader.
         *
         * I figure this is ok as the tests states that it is testing implies()
         * and equals(), not the proper parsing of string's in constructors.
         */
        UnresolvedPermission foo = new UnresolvedPermission("FooPermission", null, null, null),
                             foo2 = new UnresolvedPermission("FooPermission", null, null, null),
                             bar = new UnresolvedPermission("BarPermission", null, null, null);
        Permission [] foos = {foo, foo2};
        Permission [] fooBar = {foo, bar};
  Permission gp1 = new GrantPermission(foo),
       gp2 = new GrantPermission(foos),
       gp3 = new GrantPermission(new FooPermission()),
View Full Code Here

            }
        };
        Permission sp1 = new SecurityPermission("a.b.c");
        Permission sp2 = new SecurityPermission("a.b.*");
        Permission sp3 = new SecurityPermission("a.*");
        Permission up = new UnresolvedPermission(
            "java.security.SecurityPermission", "*", null, null);

        Permission[] arr = new Permission[] {
            ap, bp1, bp2, sp1, sp2, up };
        for (int i = 0; i < arr.length; i++) {
View Full Code Here

      }
      Class cl;
      try {
    cl = Class.forName(pi.type);
      } catch (ClassNotFoundException ex) {
    l.add(new UnresolvedPermission(
        pi.type, pi.name, pi.actions, null));
    continue;
      }
      if (!Permission.class.isAssignableFrom(cl)) {
    throw new IllegalArgumentException(
View Full Code Here

        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"));
View Full Code Here

        try {
            pc = Class.forName(type, true,
                Thread.currentThread().getContextClassLoader());
        } catch (ClassNotFoundException e) {
            //this class is not recognized
            Permission pm = new UnresolvedPermission(type, name, actions, null);
            return pm;  // policy provider suppose to translate this permission later
        }
       
        if (name == null && actions == null) {
            try {
View Full Code Here

TOP

Related Classes of java.security.UnresolvedPermission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.