8274237: Replace 'for' cycles with iterator with enhanced-for in java.base

Reviewed-by: dfuchs, weijun
This commit is contained in:
Andrey Turbanov 2021-09-24 16:46:52 +00:00 committed by Weijun Wang
parent 0c050be64b
commit baafa6059e
4 changed files with 18 additions and 32 deletions

View file

@ -622,8 +622,7 @@ public final class Security {
// For each selection criterion, remove providers
// which don't satisfy the criterion from the candidate set.
for (Iterator<String> ite = keySet.iterator(); ite.hasNext(); ) {
String key = ite.next();
for (String key : keySet) {
String value = filter.get(key);
LinkedHashSet<Provider> newCandidates = getAllQualifyingCandidates(key, value,