src/share/classes/java/nio/file/attribute/AclEntry.java

Print this page

        

*** 188,199 **** * the given array. * * @return this builder */ public Builder setPermissions(AclEntryPermission... perms) { ! Set<AclEntryPermission> set = ! new HashSet<AclEntryPermission>(perms.length); // copy and check for null elements for (AclEntryPermission p: perms) { if (p == null) throw new NullPointerException(); set.add(p); --- 188,198 ---- * the given array. * * @return this builder */ public Builder setPermissions(AclEntryPermission... perms) { ! Set<AclEntryPermission> set = new HashSet<>(perms.length); // copy and check for null elements for (AclEntryPermission p: perms) { if (p == null) throw new NullPointerException(); set.add(p);
*** 226,236 **** * array. * * @return this builder */ public Builder setFlags(AclEntryFlag... flags) { ! Set<AclEntryFlag> set = new HashSet<AclEntryFlag>(flags.length); // copy and check for null elements for (AclEntryFlag f: flags) { if (f == null) throw new NullPointerException(); set.add(f); --- 225,235 ---- * array. * * @return this builder */ public Builder setFlags(AclEntryFlag... flags) { ! Set<AclEntryFlag> set = new HashSet<>(flags.length); // copy and check for null elements for (AclEntryFlag f: flags) { if (f == null) throw new NullPointerException(); set.add(f);