mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8273261: Replace 'while' cycles with iterator with enhanced-for in java.base
Reviewed-by: dfuchs, rriggs, iris, mullan
This commit is contained in:
parent
0aa63feca8
commit
56b8b35286
11 changed files with 43 additions and 92 deletions
|
@ -145,9 +145,7 @@ public final class PrivateCredentialPermission extends Permission {
|
|||
} else {
|
||||
this.credOwners = new CredOwner[principals.size()];
|
||||
int index = 0;
|
||||
Iterator<Principal> i = principals.iterator();
|
||||
while (i.hasNext()) {
|
||||
Principal p = i.next();
|
||||
for (Principal p : principals) {
|
||||
this.credOwners[index++] = new CredOwner
|
||||
(p.getClass().getName(),
|
||||
p.getName());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue