1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 09:08:49 -05:00

replaced unnecessary explicit iterator use with for-each loop

This commit is contained in:
András Veres-Szentkirályi 2014-02-15 21:50:58 +01:00
parent 8ac942d828
commit e8d3553b2c

View File

@ -157,11 +157,9 @@ public class DomainNameChecker {
private static boolean matchDns(X509Certificate certificate, String thisDomain) {
boolean hasDns = false;
try {
Collection<?> subjectAltNames = certificate.getSubjectAlternativeNames();
Collection<List<?>> subjectAltNames = certificate.getSubjectAlternativeNames();
if (subjectAltNames != null) {
Iterator<?> i = subjectAltNames.iterator();
while (i.hasNext()) {
List<?> altNameEntry = (List<?>)(i.next());
for (List<?> altNameEntry : subjectAltNames) {
if ((altNameEntry != null) && (2 <= altNameEntry.size())) {
Integer altNameType = (Integer)(altNameEntry.get(0));
if (altNameType != null && altNameType.intValue() == ALT_DNS_NAME) {