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:
parent
8ac942d828
commit
e8d3553b2c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user