jdk/src/share/classes/sun/security/acl/AclImpl.java
changeset 7970 af1579474d16
parent 5506 202f599c92aa
child 9035 1255eb81cc2f
equal deleted inserted replaced
7969:1a6282ab0d2a 7970:af1579474d16
    39     // Maintain four tables. one each for positive and negative
    39     // Maintain four tables. one each for positive and negative
    40     // ACLs. One each depending on whether the entity is a group
    40     // ACLs. One each depending on whether the entity is a group
    41     // or principal.
    41     // or principal.
    42     //
    42     //
    43     private Hashtable<Principal, AclEntry> allowedUsersTable =
    43     private Hashtable<Principal, AclEntry> allowedUsersTable =
    44                                         new Hashtable<Principal, AclEntry>(23);
    44                                         new Hashtable<>(23);
    45     private Hashtable<Principal, AclEntry> allowedGroupsTable =
    45     private Hashtable<Principal, AclEntry> allowedGroupsTable =
    46                                         new Hashtable<Principal, AclEntry>(23);
    46                                         new Hashtable<>(23);
    47     private Hashtable<Principal, AclEntry> deniedUsersTable =
    47     private Hashtable<Principal, AclEntry> deniedUsersTable =
    48                                         new Hashtable<Principal, AclEntry>(23);
    48                                         new Hashtable<>(23);
    49     private Hashtable<Principal, AclEntry> deniedGroupsTable =
    49     private Hashtable<Principal, AclEntry> deniedGroupsTable =
    50                                         new Hashtable<Principal, AclEntry>(23);
    50                                         new Hashtable<>(23);
    51     private String aclName = null;
    51     private String aclName = null;
    52     private Vector<Permission> zeroSet = new Vector<Permission>(1,1);
    52     private Vector<Permission> zeroSet = new Vector<>(1,1);
    53 
    53 
    54 
    54 
    55     /**
    55     /**
    56      * Constructor for creating an empty ACL.
    56      * Constructor for creating an empty ACL.
    57      */
    57      */
   292     //
   292     //
   293     // returns the set e1 U e2.
   293     // returns the set e1 U e2.
   294     //
   294     //
   295     private static Enumeration<Permission> union(Enumeration<Permission> e1,
   295     private static Enumeration<Permission> union(Enumeration<Permission> e1,
   296                 Enumeration<Permission> e2) {
   296                 Enumeration<Permission> e2) {
   297         Vector<Permission> v = new Vector<Permission>(20, 20);
   297         Vector<Permission> v = new Vector<>(20, 20);
   298 
   298 
   299         while (e1.hasMoreElements())
   299         while (e1.hasMoreElements())
   300             v.addElement(e1.nextElement());
   300             v.addElement(e1.nextElement());
   301 
   301 
   302         while (e2.hasMoreElements()) {
   302         while (e2.hasMoreElements()) {
   311     //
   311     //
   312     // returns the set e1 - e2.
   312     // returns the set e1 - e2.
   313     //
   313     //
   314     private Enumeration<Permission> subtract(Enumeration<Permission> e1,
   314     private Enumeration<Permission> subtract(Enumeration<Permission> e1,
   315                 Enumeration<Permission> e2) {
   315                 Enumeration<Permission> e2) {
   316         Vector<Permission> v = new Vector<Permission>(20, 20);
   316         Vector<Permission> v = new Vector<>(20, 20);
   317 
   317 
   318         while (e1.hasMoreElements())
   318         while (e1.hasMoreElements())
   319             v.addElement(e1.nextElement());
   319             v.addElement(e1.nextElement());
   320 
   320 
   321         while (e2.hasMoreElements()) {
   321         while (e2.hasMoreElements()) {