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

@ -364,8 +364,7 @@ public class X509CRLSelector implements CRLSelector {
private static HashSet<X500Principal> parseIssuerNames(Collection<Object> names)
throws IOException {
HashSet<X500Principal> x500Principals = new HashSet<>();
for (Iterator<Object> t = names.iterator(); t.hasNext(); ) {
Object nameObject = t.next();
for (Object nameObject : names) {
if (nameObject instanceof String) {
x500Principals.add(new X500Name((String)nameObject).asX500Principal());
} else {